1 /* { dg-do compile } */
2 /* { dg-additional-options "-msse2" { target sse2 } } */
4 void swap(short *p
, int cnt
)
8 *p
= ((*p
<< 8) & 0xFF00) | ((*p
>> 8) & 0x00FF);
13 /* Dependence analysis should not fail. */
14 /* { dg-final { scan-tree-dump "dependence distance == 0" "vect" } } */
15 /* On x86 with SSE2 we can vectorize this with psllw/psrlw. */
16 /* { dg-final { scan-tree-dump "loop vectorized" "vect" { target sse2 } } } */