From: Eric Anholt Date: Wed, 19 May 2010 23:06:37 +0000 (-0700) Subject: ir_to_mesa: Don't assert over assignments with a constant-true condition. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=346daeca07d3c19c051799f96fa9f442262bd49f;p=mesa.git ir_to_mesa: Don't assert over assignments with a constant-true condition. --- 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);