From 346daeca07d3c19c051799f96fa9f442262bd49f Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 19 May 2010 16:06:37 -0700 Subject: [PATCH] ir_to_mesa: Don't assert over assignments with a constant-true condition. --- ir_to_mesa.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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); -- 2.30.2