nv50/ir/opt: s/SHL/SHR in optimization of u32 DIV
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Sat, 7 Jan 2012 17:41:18 +0000 (18:41 +0100)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Mon, 9 Jan 2012 23:37:32 +0000 (00:37 +0100)
src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp

index 5b0174b16cb12597acdb132d4e95d52260f15689..2a7a981ac6140a1af84c24483d2e532dd64ac1d0 100644 (file)
@@ -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) {