1 /* PR target/49411 */
2 /* { dg-do assemble } */
3 /* { dg-options "-O0 -mf16c -maes -mpclmul" } */
4 /* { dg-require-effective-target f16c } */
5 /* { dg-require-effective-target vaes } */
6 /* { dg-require-effective-target vpclmul } */
7
8 #include <x86intrin.h>
9
10 __m128i i1, i2, i3, i4;
11 __m128 a1, a2, a3, a4;
12 __m128d d1, d2, d3, d4;
13 __m256i l1, l2, l3, l4;
14 __m256 b1, b2, b3, b4;
15 __m256d e1, e2, e3, e4;
16 __m64 m1, m2, m3, m4;
17 int k1, k2, k3, k4;
18 float f1, f2, f3, f4;
19
20 void
test8bit(void)21 test8bit (void)
22 {
23 i1 = _mm_cmpistrm (i2, i3, 255);
24 k1 = _mm_cmpistri (i2, i3, 255);
25 k1 = _mm_cmpistra (i2, i3, 255);
26 k1 = _mm_cmpistrc (i2, i3, 255);
27 k1 = _mm_cmpistro (i2, i3, 255);
28 k1 = _mm_cmpistrs (i2, i3, 255);
29 k1 = _mm_cmpistrz (i2, i3, 255);
30 i1 = _mm_cmpestrm (i2, k2, i3, k3, 255);
31 k1 = _mm_cmpestri (i2, k2, i3, k3, 255);
32 k1 = _mm_cmpestra (i2, k2, i3, k3, 255);
33 k1 = _mm_cmpestrc (i2, k2, i3, k3, 255);
34 k1 = _mm_cmpestro (i2, k2, i3, k3, 255);
35 k1 = _mm_cmpestrs (i2, k2, i3, k3, 255);
36 k1 = _mm_cmpestrz (i2, k2, i3, k3, 255);
37 b1 = _mm256_blend_ps (b2, b3, 255);
38 k1 = _cvtss_sh (f1, 255);
39 i1 = _mm256_cvtps_ph (b2, 255);
40 b1 = _mm256_dp_ps (b2, b3, 255);
41 e1 = _mm256_permute2f128_pd (e2, e3, 255);
42 b1 = _mm256_permute2f128_ps (b2, b3, 255);
43 l1 = _mm256_permute2f128_si256 (l2, l3, 255);
44 b1 = _mm256_permute_ps (b2, 255);
45 i1 = _mm_aeskeygenassist_si128 (i2, 255);
46 i1 = _mm_blend_epi16 (i2, i3, 255);
47 i1 = _mm_clmulepi64_si128 (i2, i3, 255);
48 i1 = _mm_cvtps_ph (a1, 255);
49 d1 = _mm_dp_pd (d2, d3, 255);
50 a1 = _mm_dp_ps (a2, a3, 255);
51 a1 = _mm_insert_ps (a2, a3, 255);
52 i1 = _mm_mpsadbw_epu8 (i2, i3, 255);
53 a1 = _mm_permute_ps (a2, 255);
54 i1 = _mm_slli_si128 (i2, 255);
55 i1 = _mm_srli_si128 (i2, 255);
56 }
57
58 void
test5bit(void)59 test5bit (void)
60 {
61 d1 = _mm_cmp_sd (d2, d3, 31);
62 a1 = _mm_cmp_ss (a2, a3, 31);
63 d1 = _mm_cmp_pd (d2, d3, 31);
64 a1 = _mm_cmp_ps (a2, a3, 31);
65 e1 = _mm256_cmp_pd (e2, e3, 31);
66 b1 = _mm256_cmp_ps (b2, b3, 31);
67 }
68
69 void
test4bit(void)70 test4bit (void)
71 {
72 d1 = _mm_round_pd (d2, 15);
73 d1 = _mm_round_sd (d2, d3, 15);
74 a1 = _mm_round_ps (a2, 15);
75 a1 = _mm_round_ss (a2, a2, 15);
76 a1 = _mm_blend_ps (a2, a3, 15);
77 e1 = _mm256_blend_pd (e2, e3, 15);
78 e1 = _mm256_round_pd (e2, 15);
79 b1 = _mm256_round_ps (b2, 15);
80 }
81
82 void
test2bit(void)83 test2bit (void)
84 {
85 d1 = _mm_blend_pd (d2, d3, 3);
86 }
87
88 void
test1bit(void)89 test1bit (void)
90 {
91 d1 = _mm256_extractf128_pd (e2, 1);
92 a1 = _mm256_extractf128_ps (b2, 1);
93 i1 = _mm256_extractf128_si256 (l2, 1);
94 e1 = _mm256_insertf128_pd (e2, d1, 1);
95 b1 = _mm256_insertf128_ps (b2, a1, 1);
96 l1 = _mm256_insertf128_si256 (l2, i1, 1);
97 }
98