Merge pull request #461 from bjorn3/legalize-bint-i8

Legalize bint.i8
This commit is contained in:
Dan Gohman
2018-08-13 16:02:11 -07:00
committed by GitHub
2 changed files with 19 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
test compile
target x86_64
function u0:0() -> i8 fast {
ebb0:
v14 = bconst.b1 false
v15 = bint.i8 v14
return v15
}

View File

@@ -257,6 +257,15 @@ for int_ty in [types.i8, types.i16]:
) )
) )
for int_ty in [types.i8, types.i16]:
widen.legalize(
a << insts.bint.bind(int_ty)(b),
Rtl(
x << insts.bint.i32(b),
a << ireduce.bind(int_ty)(x)
)
)
# Expand integer operations with carry for RISC architectures that don't have # Expand integer operations with carry for RISC architectures that don't have
# the flags. # the flags.
expand.legalize( expand.legalize(