Pre-opt: Use the correct operand in the irsub_imm pattern.
This commit is contained in:
@@ -75,6 +75,6 @@ ebb0(v0: i32):
|
||||
; sameln: function %irsub_imm
|
||||
; nextln: ebb0(v0: i32):
|
||||
; nextln: v1 = iconst.i32 2
|
||||
; nextln: v2 = irsub_imm v1, 2
|
||||
; nextln: v2 = irsub_imm v0, 2
|
||||
; nextln: return v2
|
||||
; nextln: }
|
||||
|
||||
@@ -505,7 +505,7 @@ fn simplify(pos: &mut FuncCursor, inst: Inst) {
|
||||
new_opcode,
|
||||
ty,
|
||||
imm,
|
||||
args[0],
|
||||
args[1],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user