diff options
Diffstat (limited to 'mesalib/src/glsl/opt_if_simplification.cpp')
-rw-r--r-- | mesalib/src/glsl/opt_if_simplification.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/mesalib/src/glsl/opt_if_simplification.cpp b/mesalib/src/glsl/opt_if_simplification.cpp index 2bec8252e..e05f03190 100644 --- a/mesalib/src/glsl/opt_if_simplification.cpp +++ b/mesalib/src/glsl/opt_if_simplification.cpp @@ -90,15 +90,9 @@ ir_if_simplification_visitor::visit_leave(ir_if *ir) * that matters out. */ if (condition_constant->value.b[0]) { - foreach_list_safe(n, &ir->then_instructions) { - ir_instruction *then_ir = (ir_instruction *) n; - ir->insert_before(then_ir); - } + ir->insert_before(&ir->then_instructions); } else { - foreach_list_safe(n, &ir->else_instructions) { - ir_instruction *else_ir = (ir_instruction *) n; - ir->insert_before(else_ir); - } + ir->insert_before(&ir->else_instructions); } ir->remove(); this->made_progress = true; |