1 /* { dg-do compile } */
2 /* This test checks for absolute memory operands.  */
3 /* { dg-require-effective-target nonpic } */
4 /* { dg-skip-if "" { *-*-* } { "-march=*" } { "-march=k8" } } */
5 /* { dg-options "-O2 -msse2 -march=k8" } */
6 /* { dg-final { scan-assembler "pand\[^\\n\]*magic" } } */
7 /* { dg-final { scan-assembler "pandn\[^\\n\]*magic" } } */
8 /* { dg-final { scan-assembler "pxor\[^\\n\]*magic" } } */
9 /* { dg-final { scan-assembler "por\[^\\n\]*magic" } } */
10 /* { dg-final { scan-assembler "movdqa" } } */
11 /* { dg-final { scan-assembler-not "movaps\[^\\n\]*magic" } } */
12 
13 /* Verify that we generate proper instruction with memory operand.  */
14 
15 #include <xmmintrin.h>
16 __m128i magic_a, magic_b;
17 __m128i
t1(void)18 t1(void)
19 {
20 return _mm_and_si128 (magic_a,magic_b);
21 }
22 __m128i
t2(void)23 t2(void)
24 {
25 return _mm_andnot_si128 (magic_a,magic_b);
26 }
27 __m128i
t3(void)28 t3(void)
29 {
30 return _mm_or_si128 (magic_a,magic_b);
31 }
32 __m128i
t4(void)33 t4(void)
34 {
35 return _mm_xor_si128 (magic_a,magic_b);
36 }
37 
38