summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2015-04-02 18:42:31 -0400
committerIlia Mirkin <[email protected]>2015-04-02 18:42:31 -0400
commit01d3b750b3682f3774f1bd01fa07a6b3c8baf28e (patch)
tree7f6913c036f49ced60752d879524beb67805ab6e
parent603d28f32c1083921ea9d54a0a606dd832e44aaa (diff)
nv50/ir: avoid folding immediates into imad operations
Commit 09ee907266 added logic to fold immediates into mad operations, but the emission code is only there for fmad. Only allow it on float types. Signed-off-by: Ilia Mirkin <[email protected]>
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
index dc048e605a5..87d95892326 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
@@ -2315,7 +2315,8 @@ NV50PostRaConstantFolding::visit(BasicBlock *bb)
i->src(0).getFile() != FILE_GPR ||
i->src(1).getFile() != FILE_GPR ||
i->src(2).getFile() != FILE_GPR ||
- i->getDef(0)->reg.data.id != i->getSrc(2)->reg.data.id)
+ i->getDef(0)->reg.data.id != i->getSrc(2)->reg.data.id ||
+ !isFloatType(i->dType))
break;
def = i->getSrc(1)->getInsn();