Mesa (master): nv50/ir/opt: s/SHL/SHR in optimization of u32 DIV
Christoph Bumiller
chrisbmr at kemper.freedesktop.org
Mon Jan 9 23:44:34 UTC 2012
Module: Mesa
Branch: master
Commit: 6ab6110133c2d316d98f78bbc38bca0c5b6184a7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6ab6110133c2d316d98f78bbc38bca0c5b6184a7
Author: Christoph Bumiller <e0425955 at student.tuwien.ac.at>
Date: Sat Jan 7 18:41:18 2012 +0100
nv50/ir/opt: s/SHL/SHR in optimization of u32 DIV
---
.../drivers/nv50/codegen/nv50_ir_peephole.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp
index 5b0174b..2a7a981 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) {
More information about the mesa-commit
mailing list