1/* PR target/52736 */ 2/* { dg-do run } */ 3/* { dg-options "-O1 -msse2" } */ 4/* { dg-require-effective-target sse2_runtime } */ 5 6#include <x86intrin.h> 7 8typedef double D __attribute__((may_alias)); 9__attribute__((aligned(16))) static const double r[4] = { 1., 5., 1., 3. }; 10 11__attribute__((noinline, noclone)) 12void 13foo (int x) 14{ 15 asm volatile ("" : "+g" (x) : : "memory"); 16 if (x != 3) 17 __builtin_abort (); 18} 19 20int 21main () 22{ 23 __m128d t = _mm_set1_pd (5.); 24 ((D *)(&t))[0] = 1.; 25 foo (_mm_movemask_pd (_mm_cmpeq_pd (t, _mm_load_pd (&r[0])))); 26 ((D *)(&t))[1] = 3.; 27 foo (_mm_movemask_pd (_mm_cmpeq_pd (t, _mm_load_pd (&r[2])))); 28 return 0; 29} 30