aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2012-03-21 23:53:01 +0100
committerChristoph Bumiller <[email protected]>2012-04-14 21:54:01 +0200
commit1e957941735fae514de658c836b8bdaf6c66bc06 (patch)
tree3694d0dbe2d81c7bf1ca7f9cafa7f61ce89c7397 /src/gallium
parent98116cc3dc3fc2cd84990cc2c968f05fe2978b4a (diff)
nv50/ir/opt: Fix for function calls.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp
index 1e5a1e531d5..021ee1f22b7 100644
--- a/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp
+++ b/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp
@@ -246,7 +246,7 @@ ConstantFolding::visit(BasicBlock *bb)
for (i = bb->getEntry(); i; i = next) {
next = i->next;
- if (i->op == OP_MOV) // continue early, MOV appears frequently
+ if (i->op == OP_MOV || i->op == OP_CALL)
continue;
ImmediateValue src0, src1;
@@ -2015,7 +2015,8 @@ GlobalCSE::visit(BasicBlock *bb)
for (s = 1; phi->srcExists(s); ++s) {
if (phi->getSrc(s)->refCount() > 1)
break;
- if (!phi->getSrc(s)->getInsn()->isResultEqual(ik))
+ if (!phi->getSrc(s)->getInsn() ||
+ !phi->getSrc(s)->getInsn()->isResultEqual(ik))
break;
}
if (!phi->srcExists(s)) {