Mesa (master): nv50/ir: fix wrong check when optimizing MAD to SHLADD

Samuel Pitoiset hakzsam at kemper.freedesktop.org
Thu Oct 6 23:13:40 UTC 2016


Module: Mesa
Branch: master
Commit: 28ecd3eac24ce41b8a855a50f366f1985d1dc934
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=28ecd3eac24ce41b8a855a50f366f1985d1dc934

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Fri Oct  7 01:08:54 2016 +0200

nv50/ir: fix wrong check when optimizing MAD to SHLADD

Checking if MAD is supported is definitely wrong, and it's
more likely a typo I introduced few days ago which breaks
NV50 because SHLADD is not supported there.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

---

 src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
index 1c71155..6efb29e 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
@@ -1030,7 +1030,7 @@ ConstantFolding::opnd(Instruction *i, ImmediateValue &imm0, int s)
          i->op = OP_ADD;
       } else
       if (s == 1 && !imm0.isNegative() && imm0.isPow2() &&
-          target->isOpSupported(i->op, i->dType)) {
+          target->isOpSupported(OP_SHLADD, i->dType)) {
          i->op = OP_SHLADD;
          imm0.applyLog2();
          i->setSrc(1, new_ImmediateValue(prog, imm0.reg.data.u32));




More information about the mesa-commit mailing list