Message ID | 20120810160955.GE1999@tucnak.redhat.com |
---|---|
State | New |
Headers | show |
On 2012-08-10 09:09, Jakub Jelinek wrote: > * gcc.dg/torture/vector-shuffle1.c (f): Pass vectors indirectly > to avoid warnings. Ok. r~
--- gcc/testsuite/gcc.dg/torture/vector-shuffle1.c.jj 2012-08-10 18:00:26.000000000 +0200 +++ gcc/testsuite/gcc.dg/torture/vector-shuffle1.c 2012-08-10 18:03:03.765134911 +0200 @@ -5,15 +5,16 @@ extern void abort (void); typedef int v2si __attribute__((vector_size(2*sizeof(int)))); -v2si f(v2si x) +void f(v2si *x) { /* This requires canonicalization of the mask to { 1, 0 }. */ - return __builtin_shuffle(x,x, (v2si) { 5, 0 }); + *x = __builtin_shuffle(*x, *x, (v2si) { 5, 0 }); } int main() { - v2si y = f((v2si) { 1, 2 }); + v2si y = { 1, 2 }; + f(&y); if (y[0] != 2 || y[1] != 1) abort (); return 0;