summaryrefslogtreecommitdiff
path: root/ir_constant_folding.cpp
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-04-06 11:52:09 -0700
committerEric Anholt <eric@anholt.net>2010-04-06 11:52:09 -0700
commit70b74928a220aff024664714877defb0caedf33f (patch)
tree25654ba34cbf54d81ae0ec3aa8dfb8e68e6ee4a5 /ir_constant_folding.cpp
parente5a9e70cde3dda27dca045b12c5a818215b1a449 (diff)
Make constant folding descend into if statements.
Diffstat (limited to 'ir_constant_folding.cpp')
-rw-r--r--ir_constant_folding.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/ir_constant_folding.cpp b/ir_constant_folding.cpp
index eabdc240ad..af6674c3f6 100644
--- a/ir_constant_folding.cpp
+++ b/ir_constant_folding.cpp
@@ -141,4 +141,7 @@ ir_constant_folding_visitor::visit(ir_if *ir)
ir->condition = const_val;
else
ir->condition->accept(this);
+
+ visit_exec_list(&ir->then_instructions, this);
+ visit_exec_list(&ir->else_instructions, this);
}