Add x86 SIMD legalization of icmp ne

This commit is contained in:
Andrew Brown
2019-10-23 15:40:46 -07:00
parent f8c3dfeb17
commit e3a20d67b2
3 changed files with 67 additions and 0 deletions

View File

@@ -496,6 +496,16 @@ pub(crate) fn define(shared: &mut SharedDefinitions, x86_instructions: &Instruct
}
}
// SIMD icmp ne
let ne = Literal::enumerator_for(&imm.intcc, "ne");
for ty in ValueType::all_lane_types().filter(|ty| allowed_simd_type(ty) && ty.is_int()) {
let icmp_ = icmp.bind(vector(ty, sse_vector_size));
narrow.legalize(
def!(c = icmp_(ne, a, b)),
vec![def!(x = icmp(eq, a, b)), def!(c = bnot(x))],
);
}
narrow.custom_legalize(shuffle, "convert_shuffle");
narrow.custom_legalize(extractlane, "convert_extractlane");
narrow.custom_legalize(insertlane, "convert_insertlane");