https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86511
--- Comment #4 from Uroš Bizjak <ubizjak at gmail dot com> --- This patch fixes inf-compare-[78].c testsuite failures on alphaev68 for me: --cut here-- diff --git a/gcc/expmed.c b/gcc/expmed.c index b01e1946898a..f114eb45e01f 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -6038,6 +6038,11 @@ emit_store_flag (rtx target, enum rtx_code code, rtx op0, rtx op1, if (!HAVE_conditional_move) return 0; + /* Do not turn a trapping comparison into a non-trapping one. */ + if ((code != EQ && code != NE && code != UNEQ && code != LTGT) + && flag_trapping_math) + return 0; + /* Try using a setcc instruction for ORDERED/UNORDERED, followed by a conditional move. */ tem = emit_store_flag_1 (subtarget, first_code, op0, op1, mode, 0, --cut here--