Fix constant-offset folding to use the correct operand for stores.
This commit is contained in:
committed by
Benjamin Bouvier
parent
2de5542139
commit
f1db50aa76
@@ -329,7 +329,7 @@ fn optimize_complex_addresses(pos: &mut EncCursor, inst: Inst, isa: &TargetIsa)
|
||||
..
|
||||
} => {
|
||||
if let Some(imm) = offset.try_add_i64(imm.into()) {
|
||||
store_args[0] = arg;
|
||||
store_args[1] = arg;
|
||||
*offset = imm;
|
||||
} else {
|
||||
// Overflow.
|
||||
|
||||
Reference in New Issue
Block a user