@@ -79,8 +79,8 @@ __m256d test_mm256_shuffle_pd(__m256d A, __m256d B) {
7979 // CIR-LABEL: test_mm256_shuffle_pd
8080 // CIR: %{{.*}} = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<4 x !cir.double>) [#cir.int<0> : !s32i, #cir.int<4> : !s32i, #cir.int<2> : !s32i, #cir.int<6> : !s32i] : !cir.vector<4 x !cir.double>
8181
82- // CHECK -LABEL: test_mm256_shuffle_pd
83- // CHECK : shufflevector <4 x double> %{{.*}}, <4 x double> %{{.*}}, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
82+ // LLVM -LABEL: test_mm256_shuffle_pd
83+ // LLVM : shufflevector <4 x double> %{{.*}}, <4 x double> %{{.*}}, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
8484
8585 // OGCG-LABEL: test_mm256_shuffle_pd
8686 // OGCG: shufflevector <4 x double> %{{.*}}, <4 x double> %{{.*}}, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
@@ -91,10 +91,58 @@ __m256 test_mm256_shuffle_ps(__m256 A, __m256 B) {
9191 // CIR-LABEL: test_mm256_shuffle_ps
9292 // CIR: %{{.*}} = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<8 x !cir.float>) [#cir.int<0> : !s32i, #cir.int<0> : !s32i, #cir.int<8> : !s32i, #cir.int<8> : !s32i, #cir.int<4> : !s32i, #cir.int<4> : !s32i, #cir.int<12> : !s32i, #cir.int<12> : !s32i] : !cir.vector<8 x !cir.float>
9393
94- // CHECK -LABEL: test_mm256_shuffle_ps
95- // CHECK : shufflevector <8 x float> %{{.*}}, <8 x float> %{{.*}}, <8 x i32> <i32 0, i32 0, i32 8, i32 8, i32 4, i32 4, i32 12, i32 12>
94+ // LLVM -LABEL: test_mm256_shuffle_ps
95+ // LLVM : shufflevector <8 x float> %{{.*}}, <8 x float> %{{.*}}, <8 x i32> <i32 0, i32 0, i32 8, i32 8, i32 4, i32 4, i32 12, i32 12>
9696
9797 // OGCG-LABEL: test_mm256_shuffle_ps
9898 // OGCG: shufflevector <8 x float> %{{.*}}, <8 x float> %{{.*}}, <8 x i32> <i32 0, i32 0, i32 8, i32 8, i32 4, i32 4, i32 12, i32 12>
9999 return _mm256_shuffle_ps (A , B , 0 );
100100}
101+
102+ __m128 test_mm_permute_ps (__m128 A ) {
103+ // CIR-LABEL: test_mm_permute_ps
104+ // CIR: cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<4 x !cir.float>) [#cir.int<2> : !s32i, #cir.int<3> : !s32i, #cir.int<0> : !s32i, #cir.int<1> : !s32i] : !cir.vector<4 x !cir.float>
105+
106+ // LLVM-LABEL: test_mm_permute_ps
107+ // LLVM: shufflevector <4 x float> %{{.*}}, <4 x float> poison, <4 x i32> <i32 2, i32 3, i32 0, i32 1>
108+
109+ // OGCG-LABEL: test_mm_permute_ps
110+ // OGCG: shufflevector <4 x float> %{{.*}}, <4 x float> poison, <4 x i32> <i32 2, i32 3, i32 0, i32 1>
111+ return _mm_permute_ps (A , 0x4E );
112+ }
113+
114+ __m256 test_mm256_permute_ps (__m256 A ) {
115+ // CIR-LABEL: test_mm256_permute_ps
116+ // CIR: cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<8 x !cir.float>) [#cir.int<2> : !s32i, #cir.int<3> : !s32i, #cir.int<0> : !s32i, #cir.int<1> : !s32i, #cir.int<6> : !s32i, #cir.int<7> : !s32i, #cir.int<4> : !s32i, #cir.int<5> : !s32i] : !cir.vector<8 x !cir.float>
117+
118+ // LLVM-LABEL: test_mm256_permute_ps
119+ // LLVM: shufflevector <8 x float> %{{.*}}, <8 x float> poison, <8 x i32> <i32 2, i32 3, i32 0, i32 1, i32 6, i32 7, i32 4, i32 5>
120+
121+ // OGCG-LABEL: test_mm256_permute_ps
122+ // OGCG: shufflevector <8 x float> %{{.*}}, <8 x float> poison, <8 x i32> <i32 2, i32 3, i32 0, i32 1, i32 6, i32 7, i32 4, i32 5>
123+ return _mm256_permute_ps (A , 0x4E );
124+ }
125+
126+ __m128d test_mm_permute_pd (__m128d A ) {
127+ // CIR-LABEL: test_mm_permute_pd
128+ // CIR: cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<2 x !cir.double>) [#cir.int<1> : !s32i, #cir.int<0> : !s32i] : !cir.vector<2 x !cir.double>
129+
130+ // LLVM-LABEL: test_mm_permute_pd
131+ // LLVM: shufflevector <2 x double> %{{.*}}, <2 x double> poison, <2 x i32> <i32 1, i32 0>
132+
133+ // OGCG-LABEL: test_mm_permute_pd
134+ // OGCG: shufflevector <2 x double> %{{.*}}, <2 x double> poison, <2 x i32> <i32 1, i32 0>
135+ return _mm_permute_pd (A , 0x1 );
136+ }
137+
138+ __m256d test_mm256_permute_pd (__m256d A ) {
139+ // CIR-LABEL: test_mm256_permute_pd
140+ // CIR: cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<4 x !cir.double>) [#cir.int<1> : !s32i, #cir.int<0> : !s32i, #cir.int<3> : !s32i, #cir.int<2> : !s32i] : !cir.vector<4 x !cir.double>
141+
142+ // LLVM-LABEL: test_mm256_permute_pd
143+ // LLVM: shufflevector <4 x double> %{{.*}}, <4 x double> poison, <4 x i32> <i32 1, i32 0, i32 3, i32 2>
144+
145+ // OGCG-LABEL: test_mm256_permute_pd
146+ // OGCG: shufflevector <4 x double> %{{.*}}, <4 x double> poison, <4 x i32> <i32 1, i32 0, i32 3, i32 2>
147+ return _mm256_permute_pd (A , 0x5 );
148+ }
0 commit comments