[PATCH] R600/SI: Select BUILD_PAIR using SSrc instead of VSrc.

Tom Stellard tom at stellard.net
Thu Apr 17 17:56:50 PDT 2014


On Tue, Apr 15, 2014 at 10:10:22PM -0400, Tom Stellard wrote:
> On Tue, Apr 15, 2014 at 07:02:47PM -0700, Matt Arsenault wrote:
> > 
> > On Apr 1, 2014, at 6:40 AM, Tom Stellard <tom at stellard.net> wrote:
> > 
> > > On Mon, Mar 31, 2014 at 05:49:50PM -0700, Matt Arsenault wrote:
> > >> The test changes are somewhat unfortunate. Instead of moving the immediate 0 directly into the VGPR, it is moved into an SGPR, and then that SGPR is copied. This is more or less OK since the 0 needs to be loaded anyway into the SGPR, but it would probably be better if it also just used the immediate 0 for the v_mov.
> > >> 
> > > 
> > > I have a similar patch here:
> > > http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140317/209824.html
> > > 
> > > But I think it makes sense to use SSrc_64 instead of SGPR_64 like you've
> > > done here.
> > > 
> > > There are a number of regressions related to these patches that I'm
> > > working on fixing now.  I'll let you know when this patch is safe to
> > > commit.
> > > 
> > > -Tom
> > > 
> > 
> > Some of these have gone in already, so is this OK now?
> 
> Not yet, I'm still working on a few regressions.
> 

I just pushed my version of the patch which uses SReg_64 instead of
SSrc_64.  Originally I thought SSrc_64 would be better for folding
immediates, but since we can't fold immediates into COPY instructions,
I think it's better to just use SReg_64.  This way we limit the number
of register classes that can be defined, which should simplify the
FixSGPRCopies pass.

-Tom



More information about the llvm-commits mailing list