[Bug rtl-optimization/15289] [3.4/3.5 Regression] reload error with non-lowpart subregs

hubicka at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Aug 26 12:19:00 GMT 2004


------- Additional Comments From hubicka at gcc dot gnu dot org  2004-08-26 12:18 -------
As explained in the cited email, the idea of patch is to avoid silent
misscompilations in the cases similar to those.  Here we have single 32bit
register holding 2 8bit fields and we happen to generate SUBREG:QI accessing one
placed in the middle of the word.

i386 has hardware support for this, but I doubt PPC does and we used to simply
pass the subreg around pass reload and forget about the funny byte offset and
finally produe read of the incorrect word.

The particular hunk of code looks quite self explaining - if the subreg can not
be represented by the hardware, we must do something.  I can add this comment to
the code if it seems benefical.

Reload is supposed to know how to reload all subregs that are produced earlier,
if he does not, it is either bug to produce one or bug in reload dealing with
this particular case.  I will try to look into how the pre 3.4 GCC happent to
deal with this.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15289



More information about the Gcc-bugs mailing list