[Bug target/69648] [5/6 Regression] wrong code with -O -mtune=winchip-c6 -fPIC -fexpensive-optimizations -msse4 @ i686

ienkovich at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Feb 4 09:38:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69648

--- Comment #7 from Ilya Enkovich <ienkovich at gcc dot gnu.org> ---
(In reply to Uroš Bizjak from comment #6)
> (In reply to Bernd Schmidt from comment #5)
> > Yeah, my current theory is that r87 is spilled at the start, then the spill
> > reg is inherited in all the existing uses of it, and lra thinks it can avoid
> > storing it to memory.
> > 
> > Then we add a new reference to it for the pinsrw insn, and that isn't
> > initialized.
> > 
> > I seem to recall that this is a general problem with the idea of using a
> > pseudo for the PIC register, so surely there must have been some attempt to
> > address this when x86 was converted. So far I can't find anything though.
> > Uroš - any pointers?
> 
> Let's ask Ilya.

We had multiple register allocation issues related to pseudo PIC register and
initial commit (r216154) has related fixes in LRA by Vladimir Makarov.  IIRC
all problems were related to wrong PIC register used for rematerialization.  I
don't remember any case with uninitialized stack slot usage.


More information about the Gcc-bugs mailing list