mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 04:20:08 +01:00
Fix ir_return cloning to actually use the cloned subexpression.
This caused a nasty bug where the function inliner would create new variables for each of the formal parameters, but the body would still reference the old copies. This was highly visible since the dead code eliminator (rightly) removed the new declarations, leading to printed IR that referenced non-existent variable names.
This commit is contained in:
parent
c07fdae33f
commit
05ddebac0a
1 changed files with 1 additions and 2 deletions
|
|
@ -264,8 +264,7 @@ ir_function_cloning_visitor::visit(ir_return *ir)
|
|||
rval = this->result->as_rvalue();
|
||||
assert(rval);
|
||||
|
||||
result = new ir_assignment(new ir_dereference(this->retval),
|
||||
ir->get_value(), NULL);
|
||||
result = new ir_assignment(new ir_dereference(this->retval), rval, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue