Add legalization for bitrev.i128 via narrowing, fixes #1116 (#1229)

This commit is contained in:
krk
2019-11-22 12:38:04 +01:00
committed by Benjamin Bouvier
parent b4528beaf5
commit bc9f05e5e2
3 changed files with 145 additions and 0 deletions

View File

@@ -877,6 +877,16 @@ pub(crate) fn define(insts: &InstructionGroup, imm: &Immediates) -> TransformGro
],
);
narrow.legalize(
def!(a = bitrev.I128(x)),
vec![
def!((xl, xh) = isplit(x)),
def!(yh = bitrev(xl)),
def!(yl = bitrev(xh)),
def!(a = iconcat(yl, yh)),
],
);
// Floating-point sign manipulations.
for &(ty, const_inst, minus_zero) in &[
(F32, f32const, &Literal::bits(&imm.ieee32, 0x8000_0000)),