Pre-opt: Use the correct operand in the irsub_imm pattern.

This commit is contained in:
Dan Gohman
2018-03-30 21:00:37 -07:00
parent 95c09bbfde
commit e107793b68
2 changed files with 2 additions and 2 deletions

View File

@@ -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: }

View File

@@ -505,7 +505,7 @@ fn simplify(pos: &mut FuncCursor, inst: Inst) {
new_opcode, new_opcode,
ty, ty,
imm, imm,
args[0], args[1],
); );
} }
} }