PPC and comparison reversal with -ffast-math
Franz Sirl
Franz.Sirl-kernel@lauterbach.com
Mon Dec 11 14:39:00 GMT 2000
Hi Geoff,
the testcase (derived from xmms) below aborts in validate_condition_mode if
compiled with -O2 -ffast-math. This is because can_reverse_comparison in
jump.c is allowed to revert LT to GE if flag_fast_math is set. Now the
question is, is it safe for your code to disable this abort if flag_fast_math
is set? In other words, is this a pure sanity check or does the CCMode code
in rs6000.c rely on that?
Franz.
[fsirl@enzo:/cvsx/gccmnp/gcc]$ gcc -O2 -ffast-math vis-bug.i
vis-bug.c: In function `vis_timeout_func':
vis-bug.c:12: Internal compiler error in validate_condition_mode, at
config/rs6000/rs6000.c:3243
typedef struct
{
float vs_data[75], vs_peak[75], vs_peak_speed[75];
int vs_refresh_delay;
int vs_doublesize;
} Vis;
void vis_timeout_func(Vis * vis)
{
if (vis->vs_peak[0] < 0.0)
vis->vs_peak[0] = 0.0;
}
More information about the Gcc-bugs
mailing list