1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mavx512vl -mno-avx512dq" } */
3
4 #include <x86intrin.h>
5
6 __m128d
f1(__m128d a,__m128d b)7 f1 (__m128d a, __m128d b)
8 {
9 return _mm_and_pd (a, b);
10 }
11
12 /* { dg-final { scan-assembler-times "vandpd\[^\n\r\]*xmm\[0-9\]" 1 } } */
13
14 __m128d
f2(__m128d a,__m128d b)15 f2 (__m128d a, __m128d b)
16 {
17 return _mm_or_pd (a, b);
18 }
19
20 /* { dg-final { scan-assembler-times "vorpd\[^\n\r\]*xmm\[0-9\]" 1 } } */
21
22 __m128d
f3(__m128d a,__m128d b)23 f3 (__m128d a, __m128d b)
24 {
25 return _mm_xor_pd (a, b);
26 }
27
28 /* { dg-final { scan-assembler-times "vxorpd\[^\n\r\]*xmm\[0-9\]" 1 } } */
29
30 __m128d
f4(__m128d a,__m128d b)31 f4 (__m128d a, __m128d b)
32 {
33 return _mm_andnot_pd (a, b);
34 }
35
36 /* { dg-final { scan-assembler-times "vandnpd\[^\n\r\]*xmm\[0-9\]" 1 } } */
37
38 __m128
f5(__m128 a,__m128 b)39 f5 (__m128 a, __m128 b)
40 {
41 return _mm_and_ps (a, b);
42 }
43
44 /* { dg-final { scan-assembler-times "vandps\[^\n\r\]*xmm\[0-9\]" 1 } } */
45
46 __m128
f6(__m128 a,__m128 b)47 f6 (__m128 a, __m128 b)
48 {
49 return _mm_or_ps (a, b);
50 }
51
52 /* { dg-final { scan-assembler-times "vorps\[^\n\r\]*xmm\[0-9\]" 1 } } */
53
54 __m128
f7(__m128 a,__m128 b)55 f7 (__m128 a, __m128 b)
56 {
57 return _mm_xor_ps (a, b);
58 }
59
60 /* { dg-final { scan-assembler-times "vxorps\[^\n\r\]*xmm\[0-9\]" 1 } } */
61
62 __m128
f8(__m128 a,__m128 b)63 f8 (__m128 a, __m128 b)
64 {
65 return _mm_andnot_ps (a, b);
66 }
67
68 /* { dg-final { scan-assembler-times "vandnps\[^\n\r\]*xmm\[0-9\]" 1 } } */
69
70 __m256d
f9(__m256d a,__m256d b)71 f9 (__m256d a, __m256d b)
72 {
73 return _mm256_and_pd (a, b);
74 }
75
76 /* { dg-final { scan-assembler-times "vandpd\[^\n\r\]*ymm\[0-9\]" 1 } } */
77
78 __m256d
f10(__m256d a,__m256d b)79 f10 (__m256d a, __m256d b)
80 {
81 return _mm256_or_pd (a, b);
82 }
83
84 /* { dg-final { scan-assembler-times "vorpd\[^\n\r\]*ymm\[0-9\]" 1 } } */
85
86 __m256d
f11(__m256d a,__m256d b)87 f11 (__m256d a, __m256d b)
88 {
89 return _mm256_xor_pd (a, b);
90 }
91
92 /* { dg-final { scan-assembler-times "vxorpd\[^\n\r\]*ymm\[0-9\]" 1 } } */
93
94 __m256d
f12(__m256d a,__m256d b)95 f12 (__m256d a, __m256d b)
96 {
97 return _mm256_andnot_pd (a, b);
98 }
99
100 /* { dg-final { scan-assembler-times "vandnpd\[^\n\r\]*ymm\[0-9\]" 1 } } */
101
102 __m256
f13(__m256 a,__m256 b)103 f13 (__m256 a, __m256 b)
104 {
105 return _mm256_and_ps (a, b);
106 }
107
108 /* { dg-final { scan-assembler-times "vandps\[^\n\r\]*ymm\[0-9\]" 1 } } */
109
110 __m256
f14(__m256 a,__m256 b)111 f14 (__m256 a, __m256 b)
112 {
113 return _mm256_or_ps (a, b);
114 }
115
116 /* { dg-final { scan-assembler-times "vorps\[^\n\r\]*ymm\[0-9\]" 1 } } */
117
118 __m256
f15(__m256 a,__m256 b)119 f15 (__m256 a, __m256 b)
120 {
121 return _mm256_xor_ps (a, b);
122 }
123
124 /* { dg-final { scan-assembler-times "vxorps\[^\n\r\]*ymm\[0-9\]" 1 } } */
125
126 __m256
f16(__m256 a,__m256 b)127 f16 (__m256 a, __m256 b)
128 {
129 return _mm256_andnot_ps (a, b);
130 }
131
132 /* { dg-final { scan-assembler-times "vandnps\[^\n\r\]*ymm\[0-9\]" 1 } } */
133