Legalize fcvt_to_sint_sat.i32x4 on x86

Use a lengthy sequence involving CVTTPS2DQ to quiet NaNs and saturate overflow.
This commit is contained in:
Andrew Brown
2020-05-26 17:14:50 -07:00
parent 3740772176
commit 3675f95bb2
4 changed files with 80 additions and 0 deletions

View File

@@ -381,6 +381,7 @@ fn define_simd(
let extractlane = insts.by_name("extractlane");
let fcmp = insts.by_name("fcmp");
let fcvt_from_uint = insts.by_name("fcvt_from_uint");
let fcvt_to_sint_sat = insts.by_name("fcvt_to_sint_sat");
let fabs = insts.by_name("fabs");
let fneg = insts.by_name("fneg");
let iadd_imm = insts.by_name("iadd_imm");
@@ -788,6 +789,7 @@ fn define_simd(
narrow.custom_legalize(ineg, "convert_ineg");
narrow.custom_legalize(ushr, "convert_ushr");
narrow.custom_legalize(ishl, "convert_ishl");
narrow.custom_legalize(fcvt_to_sint_sat, "expand_fcvt_to_sint_sat_vector");
narrow_avx.custom_legalize(imul, "convert_i64x2_imul");
narrow_avx.custom_legalize(fcvt_from_uint, "expand_fcvt_from_uint_vector");