This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH], Add power9 support to GCC, patch #4
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Michael Meissner <meissner at linux dot vnet dot ibm dot com>, gcc-patches at gcc dot gnu dot org, dje dot gcc at gmail dot com
- Date: Mon, 9 Nov 2015 13:48:35 -0600
- Subject: Re: [PATCH], Add power9 support to GCC, patch #4
- Authentication-results: sourceware.org; auth=none
- References: <20151103202911 dot GA5304 at ibm-tiger dot the-meissners dot org> <20151109003914 dot GD17170 at ibm-tiger dot the-meissners dot org> <20151109162910 dot GA9602 at gate dot crashing dot org> <20151109172734 dot GB32705 at ibm-tiger dot the-meissners dot org>
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