From: Christoph Bumiller Date: Sat, 7 Jan 2012 17:41:18 +0000 (+0100) Subject: nv50/ir/opt: s/SHL/SHR in optimization of u32 DIV X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6ab6110133c2d316d98f78bbc38bca0c5b6184a7;p=mesa.git nv50/ir/opt: s/SHL/SHR in optimization of u32 DIV --- diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp index 5b0174b16cb..2a7a981ac61 100644 --- a/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp +++ b/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp @@ -630,7 +630,7 @@ ConstantFolding::opnd(Instruction *i, ImmediateValue *src, int s) i->setSrc(1, NULL); } else if (i->dType == TYPE_U32 && imm.isPow2()) { - i->op = OP_SHL; + i->op = OP_SHR; i->setSrc(1, bld.mkImm(util_logbase2(imm.reg.data.u32))); } else if (i->dType == TYPE_U32) {