summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_expression_flattening.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/ir_expression_flattening.cpp')
-rw-r--r--src/glsl/ir_expression_flattening.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/glsl/ir_expression_flattening.cpp b/src/glsl/ir_expression_flattening.cpp
index 6dbebc63780..ccb2e2bce9e 100644
--- a/src/glsl/ir_expression_flattening.cpp
+++ b/src/glsl/ir_expression_flattening.cpp
@@ -171,8 +171,7 @@ ir_expression_flattening_visitor::visit_enter(ir_call *ir)
ir_rvalue *new_ir = operand_to_temp(ir);
if (new_ir != ir) {
- ir->insert_before(new_ir);
- ir->remove();
+ ir->replace_with(new_ir);
}
}