Mesa (master): nv50/ir: the mad source might not have a defining instruction
Ilia Mirkin
imirkin at kemper.freedesktop.org
Thu Dec 3 01:44:54 UTC 2015
Module: Mesa
Branch: master
Commit: 11fcf46590129abfa2ca2117a320e8a8052761e4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=11fcf46590129abfa2ca2117a320e8a8052761e4
Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date: Wed Dec 2 20:10:54 2015 -0500
nv50/ir: the mad source might not have a defining instruction
For example if it's $r63 (aka 0), there won't be a definition.
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable at lists.freedesktop.org>
---
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 9c42e4a..0f3caa8 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
@@ -2660,7 +2660,7 @@ NV50PostRaConstantFolding::visit(BasicBlock *bb)
break;
def = i->getSrc(1)->getInsn();
- if (def->op == OP_MOV && def->src(0).getFile() == FILE_IMMEDIATE) {
+ if (def && def->op == OP_MOV && def->src(0).getFile() == FILE_IMMEDIATE) {
vtmp = i->getSrc(1);
i->setSrc(1, def->getSrc(0));
More information about the mesa-commit
mailing list