Narrowing legalize some more bitops

This commit is contained in:
bjorn3
2019-06-29 17:01:54 +02:00
committed by Dan Gohman
parent c7a8b6c9e5
commit 599b48d95f

View File

@@ -207,7 +207,7 @@ pub(crate) fn define(insts: &InstructionGroup, imm: &Immediates) -> TransformGro
],
);
for &bin_op in &[band, bor, bxor] {
for &bin_op in &[band, bor, bxor, band_not, bor_not, bxor_not] {
narrow.legalize(
def!(a = bin_op(x, y)),
vec![
@@ -220,6 +220,16 @@ pub(crate) fn define(insts: &InstructionGroup, imm: &Immediates) -> TransformGro
);
}
narrow.legalize(
def!(a = bnot(x)),
vec![
def!((xl, xh) = isplit(x)),
def!(al = bnot(xl)),
def!(ah = bnot(xh)),
def!(a = iconcat(al, ah)),
],
);
narrow.legalize(
def!(a = select(c, x, y)),
vec![