[PATCH], Add power9 support to GCC, patch #4

Segher Boessenkool segher@kernel.crashing.org
Mon Nov 9 19:48:00 GMT 2015


On Mon, Nov 09, 2015 at 12:27:34PM -0500, Michael Meissner wrote:
> On Mon, Nov 09, 2015 at 10:29:10AM -0600, Segher Boessenkool wrote:
> > On Sun, Nov 08, 2015 at 07:39:14PM -0500, Michael Meissner wrote:
> > > +;; Pretend we have a memory form of extswsli until register allocation is done
> > > +;; so that we use LWZ to load the value from memory, instead of LWA.
> > 
> > We generate sign_extend loads for many cases where zero_extend would be
> > preferable.  We should deal with that generically, and then we can lose
> > this hack.
> 
> Well it would be nice in theory.  But since we don't have that generic pass, I
> need to use the combiner to generate the instruction.

Yes, it's for a todo list.  And it doesn't have to be a separate pass,
just a bit of tuning here or there.

This is a lot of complex work to treat a special case of a more general
problem.

> > > +(define_insn_and_split "*ashdi3_extswsli_dot"
> > 
> > ...
> > 
> > > +  if (REGNO (cr) == CR0_REGNO)
> > > +    {
> > > +      emit_insn (gen_ashdi3_extswsli_dot2 (dest, src2, shift, cr));
> > > +      DONE;
> > > +    }
> > 
> > s/dot2/dot/
> 
> No, it will endless recurse until there is a stack overflow if you use dot
> (since it will call itself, generating the same pattern over and over again).

Generating dot2 from dot does not make much sense, and dot2 calls itself
as well.  Are you sure?  Something is off here.

Cheers,


Segher



More information about the Gcc-patches mailing list