> I've tried the patch on sh4-unknown-linux-gnu. I see new failures
> with it:
Here is a reduced test case for sh4-unknown-linux-gnu.
volatile double gd[32];
volatile float gf[32];
int main ()
{
int i;
for (i = 0; i < 32; i++)
gd[i] = i * 4, gf[i] = i;
for (i = 0; i < 32; i++)
if (gd[i] != i * 4
|| gf[i] != i)
abort ();
exit (0);
}
The problem occurs at the second loop. With the patch, the only
mode switching is done at just before gf[i] != i.
OTOH the original compiler inserts mode switchings both at before
gd[i] != i * 4 and gf[i] != i.
With commenting out "if (i != mode)" of the hunk
@@ -530,10 +535,16 @@ optimize_mode_switching (void)
last_mode = mode;
ptr = new_seginfo (mode, insn, bb->index, live_now);
add_seginfo (info + bb->index, ptr);
- RESET_BIT (transp[bb->index], j);
+ for (i = 0 ; i < max_num_modes; i++)
+ if (i != mode)
+ RESET_BIT (transp[i][bb->index], j);
...
it looks all new failures go away.
Regards,
kaz