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
|
; sameln: function %irsub_imm
|
||||||
; nextln: ebb0(v0: i32):
|
; nextln: ebb0(v0: i32):
|
||||||
; nextln: v1 = iconst.i32 2
|
; nextln: v1 = iconst.i32 2
|
||||||
; nextln: v2 = irsub_imm v1, 2
|
; nextln: v2 = irsub_imm v0, 2
|
||||||
; nextln: return v2
|
; nextln: return v2
|
||||||
; nextln: }
|
; nextln: }
|
||||||
|
|||||||
@@ -505,7 +505,7 @@ fn simplify(pos: &mut FuncCursor, inst: Inst) {
|
|||||||
new_opcode,
|
new_opcode,
|
||||||
ty,
|
ty,
|
||||||
imm,
|
imm,
|
||||||
args[0],
|
args[1],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user