Hi, this testcase has volatile variable read to prevent vectorization but then it is shadowed by local var of the same name. Currently it prevents vectorization but not reliably (i.e. we can manage to optimize the conditional away from loop since it is invariant and that is what happens in my tree.)
* gcc.dg/vect/vect-strided-a-u16-i4.c: Rename volatile variable to avoid shadowing. Index: testsuite/gcc.dg/vect/vect-strided-a-u16-i4.c =================================================================== --- testsuite/gcc.dg/vect/vect-strided-a-u16-i4.c (revision 199343) +++ testsuite/gcc.dg/vect/vect-strided-a-u16-i4.c (working copy) @@ -12,7 +12,7 @@ typedef struct { unsigned short d; } s; -volatile int y = 0; +volatile int yy = 0; __attribute__ ((noinline)) int main1 () @@ -29,7 +29,7 @@ main1 () arr[i].b = i * 2; arr[i].c = 17; arr[i].d = i+34; - if (y) /* Avoid vectorization. */ + if (yy) /* Avoid vectorization. */ abort (); }