[PATCH] R600: Check if a sextload should be used for parameter loads.

Tom Stellard tom at stellard.net
Fri Apr 11 13:26:26 PDT 2014


On Fri, Apr 11, 2014 at 12:45:01PM -0700, Matt Arsenault wrote:
> On 04/11/2014 12:33 PM, Tom Stellard wrote:
> >On Fri, Apr 11, 2014 at 11:05:29AM -0700, Matt Arsenault wrote:
> >>   Ping
> >>
> >>http://reviews.llvm.org/D3300
> >>
> >Changing the intrinsics that are mapped to inputs from sext to zext
> >makes sense to me, but I don't understand why we need to do it for the
> >other scalar arguments.  Values less than 32-bit are extended prior to
> >being passed to the kernel so the ext type of the load shouldn't matter.
> >
> >-Tom
> >
> 
> What intrinsics and other scalar arguments are you talking about? 

I meant all the work-item size intrinsics that you are now using zext loads.

> In cases where it doesn't matter, zext / zextload should be preferred.
> The problematic cases I ran into were specifically for vectors,
> which as far as I can tell are not extended in any way and remain
> packed. Then they way they are loaded for R600 is just broken. It
> looks like it loads the vector, masks off part of it, and then ors
> it back with the entire vector.
>

OK, that makes sense.  It's been a while since I've dealt with parameters, so I didn't
quite follow what you were doing.

You can commit this patch.

-Tom



More information about the llvm-commits mailing list