Hi,
PR 37514 is a wrong-code problem on SH which is a 4.4 regression
started after the IRA merge. IRA makes spill slots shared if
possible when flag_ira_share_spill_slots set. In the above PR,
it causes a wrong sharing of slots on SH. I've been trying to
see why this sharing occurs but it's a hard problem for me.
With -fno-ira-share-spill-slots, the problem goes away, though
it increases the code sizes of several tests in CSiBE by ~10%.
Although this code size regression isn't ignorable, I think
that the wrong code problem is far bigger than that. I'd like
to work around this PR by defaulting to -fno-ira-share-spill-slots
on this target. The attached patch is for this. The patch also
adds a new target specific test to remember that the PR isn't fixed
yet. It's tested with bootstrap and the top level "make -k check"
on sh4-unknown-linux-gnu. The testsuite change is tested also
on i686-pc-linux-gnu.
Regards,
kaz
--
[gcc/ChangeLog]
2008-11-10 Kaz Kojima <kkojima@gcc.gnu.org>
PR rtl-optimization/37514
* config/sh/sh.h (OPTIMIZATION_OPTIONS): Set
flag_ira_share_spill_slots to 2 if it's already non-zero.
(OVERRIDE_OPTIONS): Clear flag_ira_share_spill_slots if
flag_ira_share_spill_slots is 2.