[PATCH] Fix ICEs with -mxop __builtin_ia32_vpermil2p[sd]{,256} and __builtin_ia32_vprot[bwdq]i intrinsics (PR target/49411)

Quentin Neill quentin.neill.gnu@gmail.com
Thu Jun 16 20:42:00 GMT 2011


On Wed, Jun 15, 2011 at 11:40 AM, Quentin Neill
<quentin.neill.gnu@gmail.com> wrote:
> On Wed, Jun 15, 2011 at 4:54 AM, Jakub Jelinek <jakub@redhat.com> wrote:
>> Hi!
>>
>> All of these _mm{,256}_permute2_p[sd] and _mm_roti_epi{8,16,32,64}
>> intrinsics ICE if the last argument is constant integer, but not in the
>> expected range.
>>
>> I could only find MSFT documentation for these intrinsics, where for
>> *permute2* it says that the last argument must be 0, 1, 2 or 3,
>> for *roti* it says that the last argument is integer rotation count,
>> preferrably constant and that if count is negative, it performs right
>> rotation instead of left rotation.
>> This patch adjusts the builtins to match that, if we want to instead
>> e.g. always mandate _mm_roti_epi* last argument is constant integer,
>> or constant integer in the range -N+1 .. N-1 where N is the number
>> after _mm_roti_epi, or in the range 0 .. N-1, it can be easily adjusted.
>>
>> Regtested on x86_64-linux {-m32,-m64}, unfortunately on a SandyBridge
>> box, so I couldn't verify if xop-rotate[12]-int.c actually succeeds
>> on xop capable HW.
>>
>> [snip]
>>
>>        Jakub
>>
>
> I will test on AMD HW.
> --
> Quentin

Regtested on x86_64-linux on AMD Family 16h, and verified the
xop-rotate[12]-int tests ran and passed.
-- 
Quentin



More information about the Gcc-patches mailing list