https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93073
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Slightly cleaned up testcase:
void bar (void);
void
foo (long double x, double y, double z)
{
for (;;)
{
double a = x == 0.0 ? y : z;
if (a == 0.0)
bar ();
}
}
While the exact ICE could be fixed say by:
@@ -14981,9 +14981,9 @@ rs6000_emit_cmove (rtx dest, rtx op, rtx
/* Reduce the comparison to a comparison against zero. */
if (! is_against_zero)
{
- temp = gen_reg_rtx (compare_mode);
- emit_insn (gen_rtx_SET (temp, gen_rtx_MINUS (compare_mode, op0, op1)));
- op0 = temp;
+ temp = expand_simple_binop (compare_mode, MINUS, op0, op1,
+ NULL_RTX, 0, OPTAB_LIB);
+ op0 = force_reg (compare_mode, temp);
op1 = CONST0_RTX (compare_mode);
}
the problem is that all the other operations in the rs6000_emit_cmove routine
would need similar treatment, but more importantly, the routine relies on
the *fsel<SFDF:mode><SFDF2:mode>4 instruction and that is not really available
for anything but SF/DFmode.