https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127055
--- Comment #17 from Hongtao Liu <liuhongt at gcc dot gnu.org> ---
(In reply to Hongtao Liu from comment #15)
> > {
> > rtx tmp = gen_reg_rtx (<MODE>mode);
> > emit_insn (gen_ceil<mode>2 (tmp, operands[1]));
> > @@ -26955,7 +26955,7 @@ (define_expand "btrunc<mode>2"
> > [(match_operand:VFH 1 "vector_operand")
> > (match_dup 2)]
> > UNSPEC_ROUND))]
> > - "TARGET_SSE4_1 && !flag_trapping_math"
> > + "TARGET_SSE4_1"
>
>
> Change conditon to
> "TARGET_SSE4_1 && (flag_fp_int_builtin_inexact || !flag_trapping_math)"
> instead of removing !flag_trapping_math.
No, looking at the scalar pattern
&& (TARGET_SSE4_1
|| (ROUND_<ROUNDING> != ROUND_ROUNDEVEN
&& (flag_fp_int_builtin_inexact || !flag_trapping_math))))"
We can remove !flag_trapping_math for TARGET_SSE4_1 and above.