libgcc: strange optimization
Mikael Pettersson
mikpe@it.uu.se
Tue Aug 2 08:49:00 GMT 2011
Hans-Peter Nilsson writes:
> On Mon, 1 Aug 2011, Richard Henderson wrote:
>
> > On 08/01/2011 01:30 PM, Michael Walle wrote:
> > > 1) function inlining
> > > 2) deferred argument evaluation
> > > 3) because our target has no barrel shifter, (arg >> 10) is emitted as a
> > > function call to libgcc's __ashrsi3 (_in place_!)
> > > 4) BAM! dead code elimination optimizes r8 assignment away because calli
> > > may clobber r1-r10 (callee saved registers on lm32).
> >
> > I'm afraid the only solution I can think of is to force F1 out-of-line.
>
> Or another temporary - but the parameter should already have
> that effect.
It should, but doesn't. See PR48863 for similar breakage on ARM.
/Mikael
More information about the Gcc
mailing list