Fix legalization of bxor_imm.

This commit is contained in:
Dan Gohman
2019-01-22 23:44:10 -08:00
parent c8febc1a37
commit 6326140227
2 changed files with 12 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
test legalizer
target x86_64
function %foo(i64, i64) -> i64 {
ebb0(v0: i64, v1: i64):
v2 = bxor_imm.i64 v0, 0x100000000
return v2
}
; check: v3 = iconst.i64 0x0001_0000_0000
; check: v2 = bxor v0, v3

View File

@@ -500,7 +500,7 @@ for inst_imm, inst in [
(urem_imm, urem), (urem_imm, urem),
(band_imm, band), (band_imm, band),
(bor_imm, bor), (bor_imm, bor),
(bxor_imm, bor), (bxor_imm, bxor),
(ifcmp_imm, ifcmp)]: (ifcmp_imm, ifcmp)]:
expand.legalize( expand.legalize(
a << inst_imm(x, y), a << inst_imm(x, y),