aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-05-19 16:06:37 -0700
committerEric Anholt <[email protected]>2010-06-24 15:05:21 -0700
commit346daeca07d3c19c051799f96fa9f442262bd49f (patch)
treee3fb808704d682d20b5b2028699fa342cd1313b1
parentc2014f03e8d6b7e21e2d0c31270ced04e1025653 (diff)
ir_to_mesa: Don't assert over assignments with a constant-true condition.
-rw-r--r--ir_to_mesa.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/ir_to_mesa.cpp b/ir_to_mesa.cpp
index edc95eb5caa..4238d9a8c81 100644
--- a/ir_to_mesa.cpp
+++ b/ir_to_mesa.cpp
@@ -824,7 +824,13 @@ ir_to_mesa_visitor::visit(ir_assignment *ir)
assert(l);
assert(r);
- assert(!ir->condition);
+ if (ir->condition) {
+ ir_constant *condition_constant;
+
+ condition_constant = ir->condition->constant_expression_value();
+
+ assert(condition_constant && condition_constant->value.b[0]);
+ }
t = this->create_tree(MB_TERM_assign, ir, l, r);
mono_burg_label(t, NULL);