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

Author: Ilia Mirkin <[email protected]>
Date:   Thu Sep 10 05:02:26 2015 -0400

nv50/ir: don't fold immediate into mad if registers are too high

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91551
Signed-off-by: Ilia Mirkin <[email protected]>
Cc: "11.0" <[email protected]>

---

 src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp 
b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
index b01ef41..44f74c6 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
@@ -2602,6 +2602,10 @@ NV50PostRaConstantFolding::visit(BasicBlock *bb)
              !isFloatType(i->dType))
             break;
 
+         if (i->getDef(0)->reg.data.id >= 64 ||
+             i->getSrc(0)->reg.data.id >= 64)
+            break;
+
          def = i->getSrc(1)->getInsn();
          if (def->op == OP_MOV && def->src(0).getFile() == FILE_IMMEDIATE) {
             vtmp = i->getSrc(1);

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to