[PATCH] Fix PR70434, change FE IL for vector indexing
Richard Biener
rguenther@suse.de
Tue May 24 18:51:00 GMT 2016
On May 24, 2016 6:17:19 PM GMT+02:00, Jakub Jelinek <jakub@redhat.com> wrote:
>On Mon, May 23, 2016 at 04:22:57PM +0200, Richard Biener wrote:
>> *** /dev/null 1970-01-01 00:00:00.000000000 +0000
>> --- gcc/testsuite/c-c++-common/vector-subscript-5.c 2016-05-23
>16:17:41.148043066 +0200
>> ***************
>> *** 0 ****
>> --- 1,13 ----
>> + /* { dg-do compile } */
>> +
>> + typedef int U __attribute__ ((vector_size (16)));
>> +
>> + int
>> + foo (int i)
>> + {
>> + register U u
>> + #if __SSE2__
>> + asm ("xmm0");
>> + #endif
>> + return u[i];
>> + }
>
>This test fails on i?86 (and supposedly on all non-x86 arches too).
Oops, sorry. And thanks for the fix.
Richard.
>I've tested following fix and committed as obvious to trunk:
>
>2016-05-24 Jakub Jelinek <jakub@redhat.com>
>
> PR middle-end/70434
> PR c/69504
> * c-c++-common/vector-subscript-5.c (foo): Move ; out of the ifdef.
>
>--- gcc/testsuite/c-c++-common/vector-subscript-5.c.jj 2016-05-24
>10:56:00.000000000 +0200
>+++ gcc/testsuite/c-c++-common/vector-subscript-5.c 2016-05-24
>18:11:51.778520055 +0200
>@@ -7,7 +7,8 @@ foo (int i)
> {
> register U u
> #if __SSE2__
>- asm ("xmm0");
>+ asm ("xmm0")
> #endif
>+ ;
> return u[i];
> }
>
> Jakub
More information about the Gcc-patches
mailing list