2 /* { dg-options "-O2 -fpredictive-commoning -msse2 -std=c99" } */
3 /* { dg-require-effective-target sse2 } */
8 #include "sse-os-support.h"
12 const float mem
[8] = { 0, 1, 2, 3, 4, 5, 6, 7 };
14 unsigned int indexes
[8];
15 for (unsigned int i
= 0; i
< 8; ++i
) indexes
[i
] = i
;
19 if (!sse_os_support ())
22 __m128 x
= _mm_setr_ps(0, 1, 2, 3);
23 for (unsigned int i
= 0; i
+ 4 < 6; ++i
) {
24 const unsigned int *ii
= &indexes
[i
];
25 const __m128 tmp
= _mm_setr_ps(mem
[ii
[0]], mem
[ii
[1]], mem
[ii
[2]], mem
[ii
[3]]);
26 if (0xf != _mm_movemask_ps(_mm_cmpeq_ps(tmp
, x
))) {
29 x
= _mm_add_ps(x
, _mm_set1_ps(1));