#define CHECK_EXP(UNION_TYPE, VALUE_TYPE, FMT) \
static int \
-__attribute__((optimize ("no-strict-aliasing"))) \
__attribute__((noinline, unused)) \
check_##UNION_TYPE (UNION_TYPE u, const VALUE_TYPE *v) \
{ \
int source1[4]={34, 545, 955, 67};
int source2[4]={67, 4, 57, 897};
int e[4];
+ float f[4];
s1.x = _mm_loadu_ps ((float *)source1);
s2.x = _mm_loadu_ps ((float *)source2);
e[1] = (~source1[1]) & source2[1];
e[2] = (~source1[2]) & source2[2];
e[3] = (~source1[3]) & source2[3];
+ __builtin_memcpy (f, e, sizeof (f));
- if (check_union128 (u, (float *)e))
+ if (check_union128 (u, f))
abort ();
}
float f[4];
int i[4];
}source1, source2, e;
+ float f[4];
s1.x = _mm_set_ps (34, 545, 955, 67);
s2.x = _mm_set_ps (67, 4, 57, 897);
e.i[1] = source1.i[1] & source2.i[1];
e.i[2] = source1.i[2] & source2.i[2];
e.i[3] = source1.i[3] & source2.i[3];
+ __builtin_memcpy (f, e.f, sizeof (f));
- if (check_union128 (u, e.f))
+ if (check_union128 (u, f))
abort ();
}
long long source1[2]={34545, 95567};
long long source2[2]={674, 57897};
long long e[2];
+ double d[2];
s1.x = _mm_loadu_pd ((double *)source1);
s2.x = _mm_loadu_pd ((double *)source2);
e[0] = (~source1[0]) & source2[0];
e[1] = (~source1[1]) & source2[1];
+ __builtin_memcpy (d, e, sizeof (d));
- if (check_union128d (u, (double *)e))
+ if (check_union128d (u, d))
abort ();
}
double d[2];
long long ll[2];
}source1, source2, e;
+ double d[2];
s1.x = _mm_set_pd (34545, 95567);
s2.x = _mm_set_pd (674, 57897);
e.ll[0] = source1.ll[0] & source2.ll[0];
e.ll[1] = source1.ll[1] & source2.ll[1];
+ __builtin_memcpy (d, e.d, sizeof (d));
- if (check_union128d (u, e.d))
+ if (check_union128d (u, d))
abort ();
}