1 /* { dg-require-effective-target vect_bswap } */
8 vfoo16 (unsigned short int* a
)
11 for (i
= 0; i
< N
; ++i
)
12 a
[i
] = __builtin_bswap16 (a
[i
]);
18 unsigned short arr
[N
];
19 unsigned short expect
[N
];
24 for (i
= 0; i
< N
; ++i
)
27 expect
[i
] = __builtin_bswap16 (i
);
28 asm volatile ("" ::: "memory");
33 for (i
= 0; i
< N
; ++i
)
35 if (arr
[i
] != expect
[i
])
42 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */