1 /* { dg-do compile } */ 2 /* Pick an arbitrary target for which unaligned accesses are more 3 expensive. */ 4 /* { dg-options "-O3 -msve-vector-bits=256 -mtune=thunderx -fno-vect-cost-model" } */ 5 6 #define N 32 7 #define MAX_START 8 8 #define COUNT 16 9 10 int x[MAX_START][N] __attribute__((aligned(32))); 11 12 void __attribute__((noinline, noclone)) foo(int start)13foo (int start) 14 { 15 for (int i = start; i < start + COUNT; ++i) 16 x[start][i] = i; 17 } 18 19 /* We should operate on aligned vectors. */ 20 /* { dg-final { scan-assembler {\t(adrp|adr)\tx[0-9]+, (x|\.LANCHOR0)\n} } } */ 21 /* { dg-final { scan-assembler {\tubfx\t} } } */ 22