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

Matt Arsenault Matthew.Arsenault at amd.com
Fri Apr 11 12:45:01 PDT 2014


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? 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.

-Matt



More information about the llvm-commits mailing list