// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -target-feature +avx512vl -fclangir -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion // RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s // RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -target-feature +avx512vl -fclangir -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion // RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s // RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -target-feature +avx512vl -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion // RUN: FileCheck --check-prefixes=OGCG --input-file=%t.ll %s #include __m128d test_mm_mmask_i64gather_pd(__m128d __v1_old, __mmask8 __mask, __m128i __index, void const *__addr) { // CIR-LABEL: test_mm_mmask_i64gather_pd // CIR: cir.call_llvm_intrinsic "x86.avx512.mask.gather3div2.df" // LLVM-LABEL: @test_mm_mmask_i64gather_pd // LLVM: @llvm.x86.avx512.mask.gather3div2.df // OGCG-LABEL: @test_mm_mmask_i64gather_pd // OGCG: @llvm.x86.avx512.mask.gather3div2.df return _mm_mmask_i64gather_pd(__v1_old, __mask, __index, __addr, 2); } __m128i test_mm_mmask_i64gather_epi64(__m128i __v1_old, __mmask8 __mask, __m128i __index, void const *__addr) { // CIR-LABEL: test_mm_mmask_i64gather_epi64 // CIR: cir.call_llvm_intrinsic "x86.avx512.mask.gather3div2.di" // LLVM-LABEL: @test_mm_mmask_i64gather_epi64 // LLVM: @llvm.x86.avx512.mask.gather3div2.di // OGCG-LABEL: @test_mm_mmask_i64gather_epi64 // OGCG: @llvm.x86.avx512.mask.gather3div2.di return _mm_mmask_i64gather_epi64(__v1_old, __mask, __index, __addr, 2); } __m256d test_mm256_mmask_i64gather_pd(__m256d __v1_old, __mmask8 __mask, __m256i __index, void const *__addr) { // CIR-LABEL: test_mm256_mmask_i64gather_pd // CIR: cir.call_llvm_intrinsic "x86.avx512.mask.gather3div4.df" // LLVM-LABEL: @test_mm256_mmask_i64gather_pd // LLVM: @llvm.x86.avx512.mask.gather3div4.df // OGCG-LABEL: @test_mm256_mmask_i64gather_pd // OGCG: @llvm.x86.avx512.mask.gather3div4.df return _mm256_mmask_i64gather_pd(__v1_old, __mask, __index, __addr, 2); } __m256i test_mm256_mmask_i64gather_epi64(__m256i __v1_old, __mmask8 __mask, __m256i __index, void const *__addr) { // CIR-LABEL: test_mm256_mmask_i64gather_epi64 // CIR: cir.call_llvm_intrinsic "x86.avx512.mask.gather3div4.di" // LLVM-LABEL: @test_mm256_mmask_i64gather_epi64 // LLVM: @llvm.x86.avx512.mask.gather3div4.di // OGCG-LABEL: @test_mm256_mmask_i64gather_epi64 // OGCG: @llvm.x86.avx512.mask.gather3div4.di return _mm256_mmask_i64gather_epi64(__v1_old, __mask, __index, __addr, 2); } __m128 test_mm_mmask_i64gather_ps(__m128 __v1_old, __mmask8 __mask, __m128i __index, void const *__addr) { // CIR-LABEL: test_mm_mmask_i64gather_ps // CIR: cir.call_llvm_intrinsic "x86.avx512.mask.gather3div4.sf" // LLVM-LABEL: @test_mm_mmask_i64gather_ps // LLVM: @llvm.x86.avx512.mask.gather3div4.sf // OGCG-LABEL: @test_mm_mmask_i64gather_ps // OGCG: @llvm.x86.avx512.mask.gather3div4.sf return _mm_mmask_i64gather_ps(__v1_old, __mask, __index, __addr, 2); } __m128i test_mm_mmask_i64gather_epi32(__m128i __v1_old, __mmask8 __mask, __m128i __index, void const *__addr) { // CIR-LABEL: test_mm_mmask_i64gather_epi32 // CIR: cir.call_llvm_intrinsic "x86.avx512.mask.gather3div4.si" // LLVM-LABEL: @test_mm_mmask_i64gather_epi32 // LLVM: @llvm.x86.avx512.mask.gather3div4.si // OGCG-LABEL: @test_mm_mmask_i64gather_epi32 // OGCG: @llvm.x86.avx512.mask.gather3div4.si return _mm_mmask_i64gather_epi32(__v1_old, __mask, __index, __addr, 2); } __m128 test_mm256_mmask_i64gather_ps(__m128 __v1_old, __mmask8 __mask, __m256i __index, void const *__addr) { // CIR-LABEL: test_mm256_mmask_i64gather_ps // CIR: cir.call_llvm_intrinsic "x86.avx512.mask.gather3div8.sf" // LLVM-LABEL: @test_mm256_mmask_i64gather_ps // LLVM: @llvm.x86.avx512.mask.gather3div8.sf // OGCG-LABEL: @test_mm256_mmask_i64gather_ps // OGCG: @llvm.x86.avx512.mask.gather3div8.sf return _mm256_mmask_i64gather_ps(__v1_old, __mask, __index, __addr, 2); } __m128i test_mm256_mmask_i64gather_epi32(__m128i __v1_old, __mmask8 __mask, __m256i __index, void const *__addr) { // CIR-LABEL: test_mm256_mmask_i64gather_epi32 // CIR: cir.call_llvm_intrinsic "x86.avx512.mask.gather3div8.si" // LLVM-LABEL: @test_mm256_mmask_i64gather_epi32 // LLVM: @llvm.x86.avx512.mask.gather3div8.si // OGCG-LABEL: @test_mm256_mmask_i64gather_epi32 // OGCG: @llvm.x86.avx512.mask.gather3div8.si return _mm256_mmask_i64gather_epi32(__v1_old, __mask, __index, __addr, 2); } __m128d test_mm_mask_i32gather_pd(__m128d __v1_old, __mmask8 __mask, __m128i __index, void const *__addr) { // CIR-LABEL: test_mm_mask_i32gather_pd // CIR: cir.call_llvm_intrinsic "x86.avx512.mask.gather3siv2.df" // LLVM-LABEL: @test_mm_mask_i32gather_pd // LLVM: @llvm.x86.avx512.mask.gather3siv2.df // OGCG-LABEL: @test_mm_mask_i32gather_pd // OGCG: @llvm.x86.avx512.mask.gather3siv2.df return _mm_mmask_i32gather_pd(__v1_old, __mask, __index, __addr, 2); } __m128i test_mm_mask_i32gather_epi64(__m128i __v1_old, __mmask8 __mask, __m128i __index, void const *__addr) { // CIR-LABEL: test_mm_mask_i32gather_epi64 // CIR: cir.call_llvm_intrinsic "x86.avx512.mask.gather3siv2.di" // LLVM-LABEL: @test_mm_mask_i32gather_epi64 // LLVM: @llvm.x86.avx512.mask.gather3siv2.di // OGCG-LABEL: @test_mm_mask_i32gather_epi64 // OGCG: @llvm.x86.avx512.mask.gather3siv2.di return _mm_mmask_i32gather_epi64(__v1_old, __mask, __index, __addr, 2); } __m256d test_mm256_mask_i32gather_pd(__m256d __v1_old, __mmask8 __mask, __m128i __index, void const *__addr) { // CIR-LABEL: test_mm256_mask_i32gather_pd // CIR: cir.call_llvm_intrinsic "x86.avx512.mask.gather3siv4.df" // LLVM-LABEL: @test_mm256_mask_i32gather_pd // LLVM: @llvm.x86.avx512.mask.gather3siv4.df // OGCG-LABEL: @test_mm256_mask_i32gather_pd // OGCG: @llvm.x86.avx512.mask.gather3siv4.df return _mm256_mmask_i32gather_pd(__v1_old, __mask, __index, __addr, 2); } __m256i test_mm256_mask_i32gather_epi64(__m256i __v1_old, __mmask8 __mask, __m128i __index, void const *__addr) { // CIR-LABEL: test_mm256_mask_i32gather_epi64 // CIR: cir.call_llvm_intrinsic "x86.avx512.mask.gather3siv4.di" // LLVM-LABEL: @test_mm256_mask_i32gather_epi64 // LLVM: @llvm.x86.avx512.mask.gather3siv4.di // OGCG-LABEL: @test_mm256_mask_i32gather_epi64 // OGCG: @llvm.x86.avx512.mask.gather3siv4.di return _mm256_mmask_i32gather_epi64(__v1_old, __mask, __index, __addr, 2); } __m128 test_mm_mask_i32gather_ps(__m128 __v1_old, __mmask8 __mask, __m128i __index, void const *__addr) { // CIR-LABEL: test_mm_mask_i32gather_ps // CIR: cir.call_llvm_intrinsic "x86.avx512.mask.gather3siv4.sf" // LLVM-LABEL: @test_mm_mask_i32gather_ps // LLVM: @llvm.x86.avx512.mask.gather3siv4.sf // OGCG-LABEL: @test_mm_mask_i32gather_ps // OGCG: @llvm.x86.avx512.mask.gather3siv4.sf return _mm_mmask_i32gather_ps(__v1_old, __mask, __index, __addr, 2); } __m128i test_mm_mask_i32gather_epi32(__m128i __v1_old, __mmask8 __mask, __m128i __index, void const *__addr) { // CIR-LABEL: test_mm_mask_i32gather_epi32 // CIR: cir.call_llvm_intrinsic "x86.avx512.mask.gather3siv4.si" // LLVM-LABEL: @test_mm_mask_i32gather_epi32 // LLVM: @llvm.x86.avx512.mask.gather3siv4.si // OGCG-LABEL: @test_mm_mask_i32gather_epi32 // OGCG: @llvm.x86.avx512.mask.gather3siv4.si return _mm_mmask_i32gather_epi32(__v1_old, __mask, __index, __addr, 2); } __m256 test_mm256_mask_i32gather_ps(__m256 __v1_old, __mmask8 __mask, __m256i __index, void const *__addr) { // CIR-LABEL: test_mm256_mask_i32gather_ps // CIR: cir.call_llvm_intrinsic "x86.avx512.mask.gather3siv8.sf" // LLVM-LABEL: @test_mm256_mask_i32gather_ps // LLVM: @llvm.x86.avx512.mask.gather3siv8.sf // OGCG-LABEL: @test_mm256_mask_i32gather_ps // OGCG: @llvm.x86.avx512.mask.gather3siv8.sf return _mm256_mmask_i32gather_ps(__v1_old, __mask, __index, __addr, 2); } __m256i test_mm256_mask_i32gather_epi32(__m256i __v1_old, __mmask8 __mask, __m256i __index, void const *__addr) { // CIR-LABEL: test_mm256_mask_i32gather_epi32 // CIR: cir.call_llvm_intrinsic "x86.avx512.mask.gather3siv8.si" // LLVM-LABEL: @test_mm256_mask_i32gather_epi32 // LLVM: @llvm.x86.avx512.mask.gather3siv8.si // OGCG-LABEL: @test_mm256_mask_i32gather_epi32 // OGCG: @llvm.x86.avx512.mask.gather3siv8.si return _mm256_mmask_i32gather_epi32(__v1_old, __mask, __index, __addr, 2); } __m128i test_mm_ror_epi32(__m128i __A) { // CIR-LABEL: test_mm_ror_epi32 // CIR: cir.vec.splat %{{.*}} : !u32i, !cir.vector<4 x !u32i> // CIR: cir.call_llvm_intrinsic "fshr" %{{.*}}: (!cir.vector<4 x !s32i>, !cir.vector<4 x !s32i>, !cir.vector<4 x !u32i>) -> !cir.vector<4 x !s32i> // LLVM-LABEL: @test_mm_ror_epi32 // LLVM: %[[CASTED_VAR:.*]] = bitcast <2 x i64> %{{.*}} to <4 x i32> // LLVM: call <4 x i32> @llvm.fshr.v4i32(<4 x i32> %[[CASTED_VAR]], <4 x i32> %[[CASTED_VAR]], <4 x i32> splat (i32 5)) // OGCG-LABEL: @test_mm_ror_epi32 // OGCG: %[[CASTED_VAR:.*]] = bitcast <2 x i64> %{{.*}} to <4 x i32> // OGCG: call <4 x i32> @llvm.fshr.v4i32(<4 x i32> %[[CASTED_VAR]], <4 x i32> %[[CASTED_VAR]], <4 x i32> splat (i32 5)) return _mm_ror_epi32(__A, 5); } __m256i test_mm256_ror_epi32(__m256i __A) { // CIR-LABEL: test_mm256_ror_epi32 // CIR: cir.vec.splat %{{.*}} : !u32i, !cir.vector<8 x !u32i> // CIR: cir.call_llvm_intrinsic "fshr" %{{.*}}: (!cir.vector<8 x !s32i>, !cir.vector<8 x !s32i>, !cir.vector<8 x !u32i>) -> !cir.vector<8 x !s32i> // LLVM-LABEL: @test_mm256_ror_epi32 // LLVM: %[[CASTED_VAR:.*]] = bitcast <4 x i64> %{{.*}} to <8 x i32> // LLVM: call <8 x i32> @llvm.fshr.v8i32(<8 x i32> %[[CASTED_VAR]], <8 x i32> %[[CASTED_VAR]], <8 x i32> splat (i32 5)) // OGCG-LABEL: @test_mm256_ror_epi32 // OGCG: %[[CASTED_VAR:.*]] = bitcast <4 x i64> %{{.*}} to <8 x i32> // OGCG: call <8 x i32> @llvm.fshr.v8i32(<8 x i32> %[[CASTED_VAR]], <8 x i32> %[[CASTED_VAR]], <8 x i32> splat (i32 5)) return _mm256_ror_epi32(__A, 5); } __m128i test_mm_ror_epi64(__m128i __A) { // CIR-LABEL: test_mm_ror_epi64 // CIR: cir.vec.splat %{{.*}} : !u64i, !cir.vector<2 x !u64i> // CIR: cir.call_llvm_intrinsic "fshr" %{{.*}}: (!cir.vector<2 x !s64i>, !cir.vector<2 x !s64i>, !cir.vector<2 x !u64i>) -> !cir.vector<2 x !s64i> // LLVM-LABEL: @test_mm_ror_epi64 // LLVM: call <2 x i64> @llvm.fshr.v2i64(<2 x i64> %[[V:.*]], <2 x i64> %[[V]], <2 x i64> splat (i64 5)) // OGCG-LABEL: @test_mm_ror_epi64 // OGCG: call <2 x i64> @llvm.fshr.v2i64(<2 x i64> %[[V:.*]], <2 x i64> %[[V]], <2 x i64> splat (i64 5)) return _mm_ror_epi64(__A, 5); } __m256i test_mm256_ror_epi64(__m256i __A) { // CIR-LABEL: test_mm256_ror_epi64 // CIR: cir.vec.splat %{{.*}} : !u64i, !cir.vector<4 x !u64i> // CIR: cir.call_llvm_intrinsic "fshr" %{{.*}}: (!cir.vector<4 x !s64i>, !cir.vector<4 x !s64i>, !cir.vector<4 x !u64i>) -> !cir.vector<4 x !s64i> // LLVM-LABEL: @test_mm256_ror_epi64 // LLVM: call <4 x i64> @llvm.fshr.v4i64(<4 x i64> %[[V:.*]], <4 x i64> %[[V]], <4 x i64> splat (i64 5)) // OGCG-LABEL: @test_mm256_ror_epi64 // OGCG: call <4 x i64> @llvm.fshr.v4i64(<4 x i64> %[[V:.*]], <4 x i64> %[[V]], <4 x i64> splat (i64 5)) return _mm256_ror_epi64(__A, 5); } __m256 test_mm256_insertf32x4(__m256 __A, __m128 __B) { // CIR-LABEL: test_mm256_insertf32x4 // CIR: %{{.*}} = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<8 x !cir.float>) [#cir.int<0> : !s32i, #cir.int<1> : !s32i, #cir.int<2> : !s32i, #cir.int<3> : !s32i, #cir.int<8> : !s32i, #cir.int<9> : !s32i, #cir.int<10> : !s32i, #cir.int<11> : !s32i] : !cir.vector<8 x !cir.float> // LLVM-LABEL: @test_mm256_insertf32x4 // LLVM: shufflevector <8 x float> %{{.*}}, <8 x float> %{{.*}}, <8 x i32> // OGCG-LABEL: @test_mm256_insertf32x4 // OGCG: shufflevector <8 x float> %{{.*}}, <8 x float> %{{.*}}, <8 x i32> return _mm256_insertf32x4(__A, __B, 1); } __m256i test_mm256_inserti32x4(__m256i __A, __m128i __B) { // CIR-LABEL: test_mm256_inserti32x4 // CIR: %{{.*}} = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<8 x !s32i>) [#cir.int<0> : !s32i, #cir.int<1> : !s32i, #cir.int<2> : !s32i, #cir.int<3> : !s32i, #cir.int<8> : !s32i, #cir.int<9> : !s32i, #cir.int<10> : !s32i, #cir.int<11> : !s32i] : !cir.vector<8 x !s32i> // LLVM-LABEL: @test_mm256_inserti32x4 // LLVM: shufflevector <8 x i32> %{{.*}}, <8 x i32> %{{.*}}, <8 x i32> // OGCG-LABEL: @test_mm256_inserti32x4 // OGCG: shufflevector <8 x i32> %{{.*}}, <8 x i32> %{{.*}}, <8 x i32> return _mm256_inserti32x4(__A, __B, 1); } __m128d test_mm_mask_expand_pd(__m128d __W, __mmask8 __U, __m128d __A) { // CIR-LABEL: _mm_mask_expand_pd // CIR: %[[MASK:.*]] = cir.cast bitcast {{.*}} : !u8i -> !cir.vector<8 x !cir.int> // CIR: %[[SHUF:.*]] = cir.vec.shuffle(%[[MASK]], %[[MASK]] : !cir.vector<8 x !cir.int>) [#cir.int<0> : !s32i, #cir.int<1> : !s32i] : !cir.vector<2 x !cir.int> // LLVM-LABEL: test_mm_mask_expand_pd // LLVM: %[[BC:.*]] = bitcast i8 %{{.*}} to <8 x i1> // LLVM: %[[SHUF:.*]] = shufflevector <8 x i1> %[[BC]], <8 x i1> %[[BC]], <2 x i32> // OGCG-LABEL: test_mm_mask_expand_pd // OGCG: %[[BC:.*]] = bitcast i8 %{{.*}} to <8 x i1> // OGCG: %[[SHUF:.*]] = shufflevector <8 x i1> %[[BC]], <8 x i1> %[[BC]], <2 x i32> return _mm_mask_expand_pd(__W,__U,__A); } __m128d test_mm_maskz_expand_pd(__mmask8 __U, __m128d __A) { // CIR-LABEL: _mm_maskz_expand_pd // CIR: %[[MASK:.*]] = cir.cast bitcast {{.*}} : !u8i -> !cir.vector<8 x !cir.int> // CIR: %[[SHUF:.*]] = cir.vec.shuffle(%[[MASK]], %[[MASK]] : !cir.vector<8 x !cir.int>) [#cir.int<0> : !s32i, #cir.int<1> : !s32i] : !cir.vector<2 x !cir.int> // LLVM-LABEL: test_mm_maskz_expand_pd // LLVM: %[[BC:.*]] = bitcast i8 %{{.*}} to <8 x i1> // LLVM: %[[SHUF:.*]] = shufflevector <8 x i1> %[[BC]], <8 x i1> %[[BC]], <2 x i32> // OGCG-LABEL: test_mm_maskz_expand_pd // OGCG: %[[BC:.*]] = bitcast i8 %{{.*}} to <8 x i1> // OGCG: %[[SHUF:.*]] = shufflevector <8 x i1> %[[BC]], <8 x i1> %[[BC]], <2 x i32> return _mm_maskz_expand_pd(__U,__A); } __m256 test_mm256_shuffle_f32x4(__m256 a, __m256 b) { // CIR-LABEL: test_mm256_shuffle_f32x4 // CIR: cir.vec.shuffle(%{{.+}}, %{{.+}} : !cir.vector<8 x !cir.float>) // CIR-SAME: [#cir.int<4> : !s32i, #cir.int<5> : !s32i, #cir.int<6> : !s32i, #cir.int<7> : !s32i, #cir.int<12> : !s32i, #cir.int<13> : !s32i, #cir.int<14> : !s32i, #cir.int<15> : !s32i] // LLVM-LABEL: test_mm256_shuffle_f32x4 // LLVM: shufflevector <8 x float> %{{.+}}, <8 x float> %{{.+}}, <8 x i32> // OGCG-LABEL: test_mm256_shuffle_f32x4 // OGCG: shufflevector <8 x float> %{{.+}}, <8 x float> %{{.+}}, <8 x i32> return _mm256_shuffle_f32x4(a, b, 0x03); // 1, 1 } __m256d test_mm256_shuffle_f64x2(__m256d a, __m256d b) { // CIR-LABEL: test_mm256_shuffle_f64x2 // CIR: cir.vec.shuffle(%{{.+}}, %{{.+}} : !cir.vector<4 x !cir.double>) // CIR-SAME: [#cir.int<2> : !s32i, #cir.int<3> : !s32i, #cir.int<6> : !s32i, #cir.int<7> : !s32i] // LLVM-LABEL: test_mm256_shuffle_f64x2 // LLVM: shufflevector <4 x double> %{{.+}}, <4 x double> %{{.+}}, <4 x i32> // OGCG-LABEL: test_mm256_shuffle_f64x2 // OGCG: shufflevector <4 x double> %{{.+}}, <4 x double> %{{.+}}, <4 x i32> return _mm256_shuffle_f64x2(a, b, 0x03); } __m256i test_mm256_shuffle_i32x4(__m256i a, __m256i b) { // CIR-LABEL: test_mm256_shuffle_i32x4 // CIR: cir.vec.shuffle(%{{.+}}, %{{.+}} : !cir.vector<8 x !s32i>) // CIR-SAME: [#cir.int<4> : !s32i, #cir.int<5> : !s32i, #cir.int<6> : !s32i, #cir.int<7> : !s32i, #cir.int<12> : !s32i, #cir.int<13> : !s32i, #cir.int<14> : !s32i, #cir.int<15> : !s32i] // LLVM-LABEL: test_mm256_shuffle_i32x4 // LLVM: shufflevector <8 x i32> %{{.+}}, <8 x i32> %{{.+}}, <8 x i32> // OGCG-LABEL: test_mm256_shuffle_i32x4 // OGCG: shufflevector <8 x i32> %{{.+}}, <8 x i32> %{{.+}}, <8 x i32> return _mm256_shuffle_i32x4(a, b, 0x03); } __m256i test_mm256_shuffle_i64x2(__m256i a, __m256i b) { // CIR-LABEL: test_mm256_shuffle_i64x2 // CIR: cir.vec.shuffle(%{{.+}}, %{{.+}} : !cir.vector<4 x !s64i>) // CIR-SAME: [#cir.int<2> : !s32i, #cir.int<3> : !s32i, #cir.int<6> : !s32i, #cir.int<7> : !s32i] // LLVM-LABEL: test_mm256_shuffle_i64x2 // LLVM: shufflevector <4 x i64> %{{.+}}, <4 x i64> %{{.+}}, <4 x i32> // OGCG-LABEL: test_mm256_shuffle_i64x2 // OGCG: shufflevector <4 x i64> %{{.+}}, <4 x i64> %{{.+}}, <4 x i32> return _mm256_shuffle_i64x2(a, b, 0x03); } __m128 test_mm_mask_loadu_ps(__m128 __W, __mmask8 __U, void const *__P) { // CIR-LABEL: _mm_mask_loadu_ps // CIR: cir.vec.masked_load align(1) %{{.*}}, %{{.*}}, %{{.*}} : !cir.ptr>, <4 x !cir.int>, <4 x !cir.float> -> !cir.vector<4 x !cir.float> // LLVM-LABEL: test_mm_mask_loadu_ps // LLVM: [[MASK4:%.*]] = shufflevector <8 x i1> %{{.+}}, <8 x i1> %{{.+}}, <4 x i32> // LLVM: call <4 x float> @llvm.masked.load.v4f32.p0(ptr align 1 %{{.+}}, <4 x i1> [[MASK4]], <4 x float> %{{.+}}) // OGCG-LABEL: test_mm_mask_loadu_ps // OGCG: [[MASK4:%.*]] = shufflevector <8 x i1> %{{.+}}, <8 x i1> %{{.+}}, <4 x i32> // OGCG: call <4 x float> @llvm.masked.load.v4f32.p0(ptr align 1 %{{.+}}, <4 x i1> [[MASK4]], <4 x float> %{{.+}}) return _mm_mask_loadu_ps(__W, __U, __P); } __m128 test_mm_maskz_loadu_ps(__mmask8 __U, void const *__P) { // CIR-LABEL: _mm_maskz_loadu_ps // CIR: cir.vec.masked_load align(1) %{{.*}}, %{{.*}}, %{{.*}} : !cir.ptr>, <4 x !cir.int>, <4 x !cir.float> -> !cir.vector<4 x !cir.float> // LLVM-LABEL: test_mm_maskz_loadu_ps // LLVM: [[MASK4:%.*]] = shufflevector <8 x i1> %{{.+}}, <8 x i1> %{{.+}}, <4 x i32> // LLVM: call <4 x float> @llvm.masked.load.v4f32.p0(ptr align 1 %{{.+}}, <4 x i1> [[MASK4]], <4 x float> %{{.+}}) // OGCG-LABEL: test_mm_maskz_loadu_ps // OGCG: [[MASK4:%.*]] = shufflevector <8 x i1> %{{.+}}, <8 x i1> %{{.+}}, <4 x i32> // OGCG: call <4 x float> @llvm.masked.load.v4f32.p0(ptr align 1 %{{.+}}, <4 x i1> [[MASK4]], <4 x float> %{{.+}}) return _mm_maskz_loadu_ps(__U, __P); } __m256 test_mm256_mask_loadu_ps(__m256 __W, __mmask8 __U, void const *__P) { // CIR-LABEL: _mm256_mask_loadu_ps // CIR: cir.vec.masked_load align(1) %{{.*}}, %{{.*}}, %{{.*}} : !cir.ptr>, <8 x !cir.int>, <8 x !cir.float> -> !cir.vector<8 x !cir.float> // LLVM-LABEL: test_mm256_mask_loadu_ps // LLVM: @llvm.masked.load.v8f32.p0(ptr align 1 %{{.*}}, <8 x i1> %{{.*}}, <8 x float> %{{.*}}) // OGCG-LABEL: @test_mm256_mask_loadu_ps // OGCG: @llvm.masked.load.v8f32.p0(ptr align 1 %{{.*}}, <8 x i1> %{{.*}}, <8 x float> %{{.*}}) return _mm256_mask_loadu_ps(__W, __U, __P); } __m256 test_mm256_maskz_loadu_ps(__mmask8 __U, void const *__P) { // CIR-LABEL: _mm256_maskz_loadu_ps // CIR: cir.vec.masked_load align(1) %{{.*}}, %{{.*}}, %{{.*}} : !cir.ptr>, <8 x !cir.int>, <8 x !cir.float> -> !cir.vector<8 x !cir.float> // LLVM-LABEL: test_mm256_maskz_loadu_ps // LLVM: @llvm.masked.load.v8f32.p0(ptr align 1 %{{.*}}, <8 x i1> %{{.*}}, <8 x float> %{{.*}}) // OGCG-LABEL: @test_mm256_maskz_loadu_ps // OGCG: @llvm.masked.load.v8f32.p0(ptr align 1 %{{.*}}, <8 x i1> %{{.*}}, <8 x float> %{{.*}}) return _mm256_maskz_loadu_ps(__U, __P); } __m256d test_mm256_mask_loadu_pd(__m256d __W, __mmask8 __U, void const *__P) { // CIR-LABEL: _mm256_mask_loadu_pd // CIR: cir.vec.masked_load align(1) %{{.*}}, %{{.*}}, %{{.*}} : !cir.ptr>, <4 x !cir.int>, <4 x !cir.double> -> !cir.vector<4 x !cir.double> // LLVM-LABEL: @test_mm256_mask_loadu_pd // LLVM: @llvm.masked.load.v4f64.p0(ptr align 1 %{{.*}}, <4 x i1> %{{.*}}, <4 x double> %{{.*}}) // OGCG-LABEL: @test_mm256_mask_loadu_pd // OGCG: @llvm.masked.load.v4f64.p0(ptr align 1 %{{.*}}, <4 x i1> %{{.*}}, <4 x double> %{{.*}}) return _mm256_mask_loadu_pd(__W, __U, __P); } __m128i test_mm_mask_loadu_epi32(__m128i __W, __mmask8 __U, void const *__P) { // CIR-LABEL: _mm_mask_loadu_epi32 // CIR: cir.vec.masked_load align(1) %{{.*}}, %{{.*}}, %{{.*}} : !cir.ptr>, <4 x !cir.int>, <4 x !s32i> -> !cir.vector<4 x !s32i> // LLVM-LABEL: @test_mm_mask_loadu_epi32 // LLVM: @llvm.masked.load.v4i32.p0(ptr align 1 %{{.*}}, <4 x i1> %{{.*}}, <4 x i32> %{{.*}}) // OGCG-LABEL: @test_mm_mask_loadu_epi32 // OGCG: @llvm.masked.load.v4i32.p0(ptr align 1 %{{.*}}, <4 x i1> %{{.*}}, <4 x i32> %{{.*}}) return _mm_mask_loadu_epi32(__W, __U, __P); } __m256i test_mm256_mask_loadu_epi32(__m256i __W, __mmask8 __U, void const *__P) { // CIR-LABEL: _mm256_mask_loadu_epi32 // CIR: cir.vec.masked_load align(1) %{{.*}}, %{{.*}}, %{{.*}} : !cir.ptr>, <8 x !cir.int>, <8 x !s32i> -> !cir.vector<8 x !s32i> // LLVM-LABEL: @test_mm256_mask_loadu_epi32 // LLVM: @llvm.masked.load.v8i32.p0(ptr align 1 %{{.*}}, <8 x i1> %{{.*}}, <8 x i32> %{{.*}}) // OGCG-LABEL: @test_mm256_mask_loadu_epi32 // OGCG: @llvm.masked.load.v8i32.p0(ptr align 1 %{{.*}}, <8 x i1> %{{.*}}, <8 x i32> %{{.*}}) return _mm256_mask_loadu_epi32(__W, __U, __P); } __m128i test_mm_mask_loadu_epi64(__m128i __W, __mmask8 __U, void const *__P) { // CIR-LABEL: _mm_mask_loadu_epi64 // CIR: cir.vec.masked_load align(1) %{{.*}}, %{{.*}}, %{{.*}} : !cir.ptr>, <2 x !cir.int>, <2 x !s64i> -> !cir.vector<2 x !s64i> // LLVM-LABEL: @test_mm_mask_loadu_epi64 // LLVM: @llvm.masked.load.v2i64.p0(ptr align 1 %{{.*}}, <2 x i1> %{{.*}}, <2 x i64> %{{.*}}) // OGCG-LABEL: @test_mm_mask_loadu_epi64 // OGCG: @llvm.masked.load.v2i64.p0(ptr align 1 %{{.*}}, <2 x i1> %{{.*}}, <2 x i64> %{{.*}}) return _mm_mask_loadu_epi64(__W, __U, __P); } __m256i test_mm256_mask_loadu_epi64(__m256i __W, __mmask8 __U, void const *__P) { // CIR-LABEL: _mm256_mask_loadu_epi64 // CIR: cir.vec.masked_load align(1) %{{.*}}, %{{.*}}, %{{.*}} : !cir.ptr>, <4 x !cir.int>, <4 x !s64i> -> !cir.vector<4 x !s64i> // LLVM-LABEL: @test_mm256_mask_loadu_epi64 // LLVM: @llvm.masked.load.v4i64.p0(ptr align 1 %{{.*}}, <4 x i1> %{{.*}}, <4 x i64> %{{.*}}) // OGCG-LABEL: @test_mm256_mask_loadu_epi64 // OGCG: @llvm.masked.load.v4i64.p0(ptr align 1 %{{.*}}, <4 x i1> %{{.*}}, <4 x i64> %{{.*}}) return _mm256_mask_loadu_epi64(__W, __U, __P); } __m256i test_mm256_maskz_loadu_epi64(__mmask8 __U, void const *__P) { // CIR-LABEL: _mm256_maskz_loadu_epi64 // CIR: cir.vec.masked_load align(1) %{{.*}}, %{{.*}}, %{{.*}} : !cir.ptr>, <4 x !cir.int>, <4 x !s64i> -> !cir.vector<4 x !s64i> // LLVM-LABEL: @test_mm256_maskz_loadu_epi64 // LLVM: @llvm.masked.load.v4i64.p0(ptr align 1 %{{.*}}, <4 x i1> %{{.*}}, <4 x i64> %{{.*}}) // OGCG-LABEL: @test_mm256_maskz_loadu_epi64 // OGCG: @llvm.masked.load.v4i64.p0(ptr align 1 %{{.*}}, <4 x i1> %{{.*}}, <4 x i64> %{{.*}}) return _mm256_maskz_loadu_epi64(__U, __P); } __m128 test_mm_mask_load_ps(__m128 __W, __mmask8 __U, void const *__P) { // CIR-LABEL: _mm_mask_load_ps // CIR: cir.vec.masked_load align(16) %{{.*}}, %{{.*}}, %{{.*}} : !cir.ptr>, <4 x !cir.int>, <4 x !cir.float> -> !cir.vector<4 x !cir.float> // LLVM-LABEL: @test_mm_mask_load_ps // LLVM: @llvm.masked.load.v4f32.p0(ptr align 16 %{{.*}}, <4 x i1> %{{.*}}, <4 x float> %{{.*}}) // OGCG-LABEL: @test_mm_mask_load_ps // OGCG: @llvm.masked.load.v4f32.p0(ptr align 16 %{{.*}}, <4 x i1> %{{.*}}, <4 x float> %{{.*}}) return _mm_mask_load_ps(__W, __U, __P); } __m128 test_mm_maskz_load_ps(__mmask8 __U, void const *__P) { // CIR-LABEL: _mm_maskz_load_ps // CIR: cir.vec.masked_load align(16) %{{.*}}, %{{.*}}, %{{.*}} : !cir.ptr>, <4 x !cir.int>, <4 x !cir.float> -> !cir.vector<4 x !cir.float> // LLVM-LABEL: @test_mm_maskz_load_ps // LLVM: @llvm.masked.load.v4f32.p0(ptr align 16 %{{.*}}, <4 x i1> %{{.*}}, <4 x float> %{{.*}}) // OGCG-LABEL: @test_mm_maskz_load_ps // OGCG: @llvm.masked.load.v4f32.p0(ptr align 16 %{{.*}}, <4 x i1> %{{.*}}, <4 x float> %{{.*}}) return _mm_maskz_load_ps(__U, __P); } __m256 test_mm256_mask_load_ps(__m256 __W, __mmask8 __U, void const *__P) { // CIR-LABEL: _mm256_mask_load_ps // CIR: cir.vec.masked_load align(32) %{{.*}}, %{{.*}}, %{{.*}} : !cir.ptr>, <8 x !cir.int>, <8 x !cir.float> -> !cir.vector<8 x !cir.float> // LLVM-LABEL: @test_mm256_mask_load_ps // LLVM: @llvm.masked.load.v8f32.p0(ptr align 32 %{{.*}}, <8 x i1> %{{.*}}, <8 x float> %{{.*}}) // OGCG-LABEL: @test_mm256_mask_load_ps // OGCG: @llvm.masked.load.v8f32.p0(ptr align 32 %{{.*}}, <8 x i1> %{{.*}}, <8 x float> %{{.*}}) return _mm256_mask_load_ps(__W, __U, __P); } __m256 test_mm256_maskz_load_ps(__mmask8 __U, void const *__P) { // CIR-LABEL: _mm256_maskz_load_ps // CIR: cir.vec.masked_load align(32) %{{.*}}, %{{.*}}, %{{.*}} : !cir.ptr>, <8 x !cir.int>, <8 x !cir.float> -> !cir.vector<8 x !cir.float> // LLVM-LABEL: @test_mm256_maskz_load_ps // LLVM: @llvm.masked.load.v8f32.p0(ptr align 32 %{{.*}}, <8 x i1> %{{.*}}, <8 x float> %{{.*}}) // OGCG-LABEL: @test_mm256_maskz_load_ps // OGCG: @llvm.masked.load.v8f32.p0(ptr align 32 %{{.*}}, <8 x i1> %{{.*}}, <8 x float> %{{.*}}) return _mm256_maskz_load_ps(__U, __P); } __m128d test_mm_mask_load_pd(__m128d __W, __mmask8 __U, void const *__P) { // CIR-LABEL: _mm_mask_load_pd // CIR: cir.vec.masked_load align(16) %{{.*}}, %{{.*}}, %{{.*}} : !cir.ptr>, <2 x !cir.int>, <2 x !cir.double> -> !cir.vector<2 x !cir.double> // LLVM-LABEL: @test_mm_mask_load_pd // LLVM: @llvm.masked.load.v2f64.p0(ptr align 16 %{{.*}}, <2 x i1> %{{.*}}, <2 x double> %{{.*}}) // OGCG-LABEL: @test_mm_mask_load_pd // OGCG: @llvm.masked.load.v2f64.p0(ptr align 16 %{{.*}}, <2 x i1> %{{.*}}, <2 x double> %{{.*}}) return _mm_mask_load_pd(__W, __U, __P); } __m128d test_mm_maskz_load_pd(__mmask8 __U, void const *__P) { // CIR-LABEL: _mm_maskz_load_pd // CIR: cir.vec.masked_load align(16) %{{.*}}, %{{.*}}, %{{.*}} : !cir.ptr>, <2 x !cir.int>, <2 x !cir.double> -> !cir.vector<2 x !cir.double> // LLVM-LABEL: @test_mm_maskz_load_pd // LLVM: @llvm.masked.load.v2f64.p0(ptr align 16 %{{.*}}, <2 x i1> %{{.*}}, <2 x double> %{{.*}}) // OGCG-LABEL: @test_mm_maskz_load_pd // OGCG: @llvm.masked.load.v2f64.p0(ptr align 16 %{{.*}}, <2 x i1> %{{.*}}, <2 x double> %{{.*}}) return _mm_maskz_load_pd(__U, __P); } __m128d test_mm_maskz_loadu_pd(__mmask8 __U, void const *__P) { // CIR-LABEL: _mm_maskz_loadu_pd // CIR: cir.vec.masked_load align(1) %{{.*}}, %{{.*}}, %{{.*}} : !cir.ptr>, <2 x !cir.int>, <2 x !cir.double> -> !cir.vector<2 x !cir.double> // LLVM-LABEL: @test_mm_maskz_loadu_pd // LLVM: @llvm.masked.load.v2f64.p0(ptr align 1 %{{.*}}, <2 x i1> %{{.*}}, <2 x double> %{{.*}}) // OGCG-LABEL: @test_mm_maskz_loadu_pd // OGCG: @llvm.masked.load.v2f64.p0(ptr align 1 %{{.*}}, <2 x i1> %{{.*}}, <2 x double> %{{.*}}) return _mm_maskz_loadu_pd(__U, __P); } __m256d test_mm256_mask_load_pd(__m256d __W, __mmask8 __U, void const *__P) { // CIR-LABEL: _mm256_mask_load_pd // CIR: cir.vec.masked_load align(32) %{{.*}}, %{{.*}}, %{{.*}} : !cir.ptr>, <4 x !cir.int>, <4 x !cir.double> -> !cir.vector<4 x !cir.double> // LLVM-LABEL: @test_mm256_mask_load_pd // LLVM: @llvm.masked.load.v4f64.p0(ptr align 32 %{{.*}}, <4 x i1> %{{.*}}, <4 x double> %{{.*}}) // OGCG-LABEL: @test_mm256_mask_load_pd // OGCG: @llvm.masked.load.v4f64.p0(ptr align 32 %{{.*}}, <4 x i1> %{{.*}}, <4 x double> %{{.*}}) return _mm256_mask_load_pd(__W, __U, __P); } __m256d test_mm256_maskz_load_pd(__mmask8 __U, void const *__P) { // CIR-LABEL: _mm256_maskz_load_pd // CIR: cir.vec.masked_load align(32) %{{.*}}, %{{.*}}, %{{.*}} : !cir.ptr>, <4 x !cir.int>, <4 x !cir.double> -> !cir.vector<4 x !cir.double> // LLVM-LABEL: @test_mm256_maskz_load_pd // LLVM: @llvm.masked.load.v4f64.p0(ptr align 32 %{{.*}}, <4 x i1> %{{.*}}, <4 x double> %{{.*}}) // OGCG-LABEL: @test_mm256_maskz_load_pd // OGCG: @llvm.masked.load.v4f64.p0(ptr align 32 %{{.*}}, <4 x i1> %{{.*}}, <4 x double> %{{.*}}) return _mm256_maskz_load_pd(__U, __P); } __m256d test_mm256_maskz_loadu_pd(__mmask8 __U, void const *__P) { // CIR-LABEL: _mm256_maskz_loadu_pd // CIR: cir.vec.masked_load align(1) %{{.*}}, %{{.*}}, %{{.*}} : !cir.ptr>, <4 x !cir.int>, <4 x !cir.double> -> !cir.vector<4 x !cir.double> // LLVM-LABEL: @test_mm256_maskz_loadu_pd // LLVM: @llvm.masked.load.v4f64.p0(ptr align 1 %{{.*}}, <4 x i1> %{{.*}}, <4 x double> %{{.*}}) // OGCG-LABEL: @test_mm256_maskz_loadu_pd // OGCG: @llvm.masked.load.v4f64.p0(ptr align 1 %{{.*}}, <4 x i1> %{{.*}}, <4 x double> %{{.*}}) return _mm256_maskz_loadu_pd(__U, __P); } __m128i test_mm_mask_load_epi32(__m128i __W, __mmask8 __U, void const *__P) { // CIR-LABEL: _mm_mask_load_epi32 // CIR: cir.vec.masked_load align(16) %{{.*}}, %{{.*}}, %{{.*}} : !cir.ptr>, <4 x !cir.int>, <4 x !s32i> -> !cir.vector<4 x !s32i> // LLVM-LABEL: @test_mm_mask_load_epi32 // LLVM: @llvm.masked.load.v4i32.p0(ptr align 16 %{{.*}}, <4 x i1> %{{.*}}, <4 x i32> %{{.*}}) // OGCG-LABEL: @test_mm_mask_load_epi32 // OGCG: @llvm.masked.load.v4i32.p0(ptr align 16 %{{.*}}, <4 x i1> %{{.*}}, <4 x i32> %{{.*}}) return _mm_mask_load_epi32(__W, __U, __P); } __m128i test_mm_maskz_load_epi32(__mmask8 __U, void const *__P) { // CIR-LABEL: _mm_maskz_load_epi32 // CIR: cir.vec.masked_load align(16) %{{.*}}, %{{.*}}, %{{.*}} : !cir.ptr>, <4 x !cir.int>, <4 x !s32i> -> !cir.vector<4 x !s32i> // LLVM-LABEL: @test_mm_maskz_load_epi32 // LLVM: @llvm.masked.load.v4i32.p0(ptr align 16 %{{.*}}, <4 x i1> %{{.*}}, <4 x i32> %{{.*}}) // OGCG-LABEL: @test_mm_maskz_load_epi32 // OGCG: @llvm.masked.load.v4i32.p0(ptr align 16 %{{.*}}, <4 x i1> %{{.*}}, <4 x i32> %{{.*}}) return _mm_maskz_load_epi32(__U, __P); } __m128i test_mm_maskz_loadu_epi32(__mmask8 __U, void const *__P) { // CIR-LABEL: _mm_maskz_loadu_epi32 // CIR: cir.vec.masked_load align(1) %{{.*}}, %{{.*}}, %{{.*}} : !cir.ptr>, <4 x !cir.int>, <4 x !s32i> -> !cir.vector<4 x !s32i> // LLVM-LABEL: @test_mm_maskz_loadu_epi32 // LLVM: @llvm.masked.load.v4i32.p0(ptr align 1 %{{.*}}, <4 x i1> %{{.*}}, <4 x i32> %{{.*}}) // OGCG-LABEL: @test_mm_maskz_loadu_epi32 // OGCG: @llvm.masked.load.v4i32.p0(ptr align 1 %{{.*}}, <4 x i1> %{{.*}}, <4 x i32> %{{.*}}) return _mm_maskz_loadu_epi32(__U, __P); } __m256i test_mm256_maskz_load_epi32(__mmask8 __U, void const *__P) { // CIR-LABEL: _mm256_maskz_load_epi32 // CIR: cir.vec.masked_load align(32) %{{.*}}, %{{.*}}, %{{.*}} : !cir.ptr>, <8 x !cir.int>, <8 x !s32i> -> !cir.vector<8 x !s32i> // LLVM-LABEL: @test_mm256_maskz_load_epi32 // LLVM: @llvm.masked.load.v8i32.p0(ptr align 32 %{{.*}}, <8 x i1> %{{.*}}, <8 x i32> %{{.*}}) // OGCG-LABEL: @test_mm256_maskz_load_epi32 // OGCG: @llvm.masked.load.v8i32.p0(ptr align 32 %{{.*}}, <8 x i1> %{{.*}}, <8 x i32> %{{.*}}) return _mm256_maskz_load_epi32(__U, __P); } __m256i test_mm256_maskz_loadu_epi32(__mmask8 __U, void const *__P) { // CIR-LABEL: _mm256_maskz_loadu_epi32 // CIR: cir.vec.masked_load align(1) %{{.*}}, %{{.*}}, %{{.*}} : !cir.ptr>, <8 x !cir.int>, <8 x !s32i> -> !cir.vector<8 x !s32i> // LLVM-LABEL: @test_mm256_maskz_loadu_epi32 // LLVM: @llvm.masked.load.v8i32.p0(ptr align 1 %{{.*}}, <8 x i1> %{{.*}}, <8 x i32> %{{.*}}) // OGCG-LABEL: @test_mm256_maskz_loadu_epi32 // OGCG: @llvm.masked.load.v8i32.p0(ptr align 1 %{{.*}}, <8 x i1> %{{.*}}, <8 x i32> %{{.*}}) return _mm256_maskz_loadu_epi32(__U, __P); } __m128i test_mm_mask_load_epi64(__m128i __W, __mmask8 __U, void const *__P) { // CIR-LABEL: _mm_mask_load_epi64 // CIR: cir.vec.masked_load align(16) %{{.*}}, %{{.*}}, %{{.*}} : !cir.ptr>, <2 x !cir.int>, <2 x !s64i> -> !cir.vector<2 x !s64i> // LLVM-LABEL: @test_mm_mask_load_epi64 // LLVM: @llvm.masked.load.v2i64.p0(ptr align 16 %{{.*}}, <2 x i1> %{{.*}}, <2 x i64> %{{.*}}) // OGCG-LABEL: @test_mm_mask_load_epi64 // OGCG: @llvm.masked.load.v2i64.p0(ptr align 16 %{{.*}}, <2 x i1> %{{.*}}, <2 x i64> %{{.*}}) return _mm_mask_load_epi64(__W, __U, __P); } __m128i test_mm_maskz_loadu_epi64(__mmask8 __U, void const *__P) { // CIR-LABEL: _mm_maskz_loadu_epi64 // CIR: cir.vec.masked_load align(1) %{{.*}}, %{{.*}}, %{{.*}} : !cir.ptr>, <2 x !cir.int>, <2 x !s64i> -> !cir.vector<2 x !s64i> // LLVM-LABEL: @test_mm_maskz_loadu_epi64 // LLVM: @llvm.masked.load.v2i64.p0(ptr align 1 %{{.*}}, <2 x i1> %{{.*}}, <2 x i64> %{{.*}}) // OGCG-LABEL: @test_mm_maskz_loadu_epi64 // OGCG: @llvm.masked.load.v2i64.p0(ptr align 1 %{{.*}}, <2 x i1> %{{.*}}, <2 x i64> %{{.*}}) return _mm_maskz_loadu_epi64(__U, __P); } __m128i test_mm_maskz_load_epi64(__mmask8 __U, void const *__P) { // CIR-LABEL: _mm_maskz_load_epi64 // CIR: cir.vec.masked_load align(16) %{{.*}}, %{{.*}}, %{{.*}} : !cir.ptr>, <2 x !cir.int>, <2 x !s64i> -> !cir.vector<2 x !s64i> // LLVM-LABEL: @test_mm_maskz_load_epi64 // LLVM: @llvm.masked.load.v2i64.p0(ptr align 16 %{{.*}}, <2 x i1> %{{.*}}, <2 x i64> %{{.*}}) // OGCG-LABEL: @test_mm_maskz_load_epi64 // OGCG: @llvm.masked.load.v2i64.p0(ptr align 16 %{{.*}}, <2 x i1> %{{.*}}, <2 x i64> %{{.*}}) return _mm_maskz_load_epi64(__U, __P); } __m256i test_mm256_mask_load_epi64(__m256i __W, __mmask8 __U, void const *__P) { // CIR-LABEL: _mm256_mask_load_epi64 // CIR: cir.vec.masked_load align(32) %{{.*}}, %{{.*}}, %{{.*}} : !cir.ptr>, <4 x !cir.int>, <4 x !s64i> -> !cir.vector<4 x !s64i> // LLVM-LABEL: @test_mm256_mask_load_epi64 // LLVM: @llvm.masked.load.v4i64.p0(ptr align 32 %{{.*}}, <4 x i1> %{{.*}}, <4 x i64> %{{.*}}) // OGCG-LABEL: @test_mm256_mask_load_epi64 // OGCG: @llvm.masked.load.v4i64.p0(ptr align 32 %{{.*}}, <4 x i1> %{{.*}}, <4 x i64> %{{.*}}) return _mm256_mask_load_epi64(__W, __U, __P); } __m256i test_mm256_maskz_load_epi64(__mmask8 __U, void const *__P) { // CIR-LABEL: _mm256_maskz_load_epi64 // CIR: cir.vec.masked_load align(32) %{{.*}}, %{{.*}}, %{{.*}} : !cir.ptr>, <4 x !cir.int>, <4 x !s64i> -> !cir.vector<4 x !s64i> // LLVM-LABEL: @test_mm256_maskz_load_epi64 // LLVM: @llvm.masked.load.v4i64.p0(ptr align 32 %{{.*}}, <4 x i1> %{{.*}}, <4 x i64> %{{.*}}) // OGCG-LABEL: @test_mm256_maskz_load_epi64 // OGCG: @llvm.masked.load.v4i64.p0(ptr align 32 %{{.*}}, <4 x i1> %{{.*}}, <4 x i64> %{{.*}}) return _mm256_maskz_load_epi64(__U, __P); } void test_mm_mask_compressstoreu_pd(void *__P, __mmask8 __U, __m128d __A) { // CIR-LABEL: _mm_mask_compressstoreu_pd // CIR: cir.call_llvm_intrinsic "masked.compressstore" %{{.*}}, %{{.*}}, %{{.*}} : (!cir.vector<2 x !cir.double>, !cir.ptr>, !cir.vector<2 x !cir.int>){{.*}} // LLVM-LABEL: @test_mm_mask_compressstoreu_pd // LLVM: @llvm.masked.compressstore.v2f64(<2 x double> %{{.*}}, ptr %{{.*}}, <2 x i1> %{{.*}}) // OGCG-LABEL: @test_mm_mask_compressstoreu_pd // OGCG: @llvm.masked.compressstore.v2f64(<2 x double> %{{.*}}, ptr %{{.*}}, <2 x i1> %{{.*}}) return _mm_mask_compressstoreu_pd(__P, __U, __A); } void test_mm256_mask_compressstoreu_pd(void *__P, __mmask8 __U, __m256d __A) { // CIR-LABEL: _mm256_mask_compressstoreu_pd // CIR: cir.call_llvm_intrinsic "masked.compressstore" %{{.*}}, %{{.*}}, %{{.*}} : (!cir.vector<4 x !cir.double>, !cir.ptr>, !cir.vector<4 x !cir.int>){{.*}} // LLVM-LABEL: @test_mm256_mask_compressstoreu_pd // LLVM: @llvm.masked.compressstore.v4f64(<4 x double> %{{.*}}, ptr %{{.*}}, <4 x i1> %{{.*}}) // OGCG-LABEL: @test_mm256_mask_compressstoreu_pd // OGCG: @llvm.masked.compressstore.v4f64(<4 x double> %{{.*}}, ptr %{{.*}}, <4 x i1> %{{.*}}) return _mm256_mask_compressstoreu_pd(__P, __U, __A); } void test_mm_mask_compressstoreu_epi64(void *__P, __mmask8 __U, __m128i __A) { // CIR-LABEL: _mm_mask_compressstoreu_epi64 // CIR: cir.call_llvm_intrinsic "masked.compressstore" %{{.*}}, %{{.*}}, %{{.*}} : (!cir.vector<2 x !s64i>, !cir.ptr>, !cir.vector<2 x !cir.int>){{.*}} // LLVM-LABEL: @test_mm_mask_compressstoreu_epi64 // LLVM: @llvm.masked.compressstore.v2i64(<2 x i64> %{{.*}}, ptr %{{.*}}, <2 x i1> %{{.*}}) // OGCG-LABEL: @test_mm_mask_compressstoreu_epi64 // OGCG: @llvm.masked.compressstore.v2i64(<2 x i64> %{{.*}}, ptr %{{.*}}, <2 x i1> %{{.*}}) return _mm_mask_compressstoreu_epi64(__P, __U, __A); } void test_mm256_mask_compressstoreu_epi64(void *__P, __mmask8 __U, __m256i __A) { // CIR-LABEL: _mm256_mask_compressstoreu_epi64 // CIR: cir.call_llvm_intrinsic "masked.compressstore" %{{.*}}, %{{.*}}, %{{.*}} : (!cir.vector<4 x !s64i>, !cir.ptr>, !cir.vector<4 x !cir.int>){{.*}} // LLVM-LABEL: @test_mm256_mask_compressstoreu_epi64 // LLVM: @llvm.masked.compressstore.v4i64(<4 x i64> %{{.*}}, ptr %{{.*}}, <4 x i1> %{{.*}}) // OGCG-LABEL: @test_mm256_mask_compressstoreu_epi64 // OGCG: @llvm.masked.compressstore.v4i64(<4 x i64> %{{.*}}, ptr %{{.*}}, <4 x i1> %{{.*}}) return _mm256_mask_compressstoreu_epi64(__P, __U, __A); } void test_mm_mask_compressstoreu_ps(void *__P, __mmask8 __U, __m128 __A) { // CIR-LABEL: _mm_mask_compressstoreu_ps // CIR: cir.call_llvm_intrinsic "masked.compressstore" %{{.*}}, %{{.*}}, %{{.*}} : (!cir.vector<4 x !cir.float>, !cir.ptr>, !cir.vector<4 x !cir.int>){{.*}} // LLVM-LABEL: @test_mm_mask_compressstoreu_ps // LLVM: @llvm.masked.compressstore.v4f32(<4 x float> %{{.*}}, ptr %{{.*}}, <4 x i1> %{{.*}}) // OGCG-LABEL: @test_mm_mask_compressstoreu_ps // OGCG: @llvm.masked.compressstore.v4f32(<4 x float> %{{.*}}, ptr %{{.*}}, <4 x i1> %{{.*}}) return _mm_mask_compressstoreu_ps(__P, __U, __A); } void test_mm256_mask_compressstoreu_ps(void *__P, __mmask8 __U, __m256 __A) { // CIR-LABEL: _mm256_mask_compressstoreu_ps // CIR: cir.call_llvm_intrinsic "masked.compressstore" %{{.*}}, %{{.*}}, %{{.*}} : (!cir.vector<8 x !cir.float>, !cir.ptr>, !cir.vector<8 x !cir.int>){{.*}} // LLVM-LABEL: @test_mm256_mask_compressstoreu_ps // LLVM: @llvm.masked.compressstore.v8f32(<8 x float> %{{.*}}, ptr %{{.*}}, <8 x i1> %{{.*}}) // OGCG-LABEL: @test_mm256_mask_compressstoreu_ps // OGCG: @llvm.masked.compressstore.v8f32(<8 x float> %{{.*}}, ptr %{{.*}}, <8 x i1> %{{.*}}) return _mm256_mask_compressstoreu_ps(__P, __U, __A); } void test_mm_mask_compressstoreu_epi32(void *__P, __mmask8 __U, __m128i __A) { // CIR-LABEL: _mm_mask_compressstoreu_epi32 // CIR: cir.call_llvm_intrinsic "masked.compressstore" %{{.*}}, %{{.*}}, %{{.*}} : (!cir.vector<4 x !s32i>, !cir.ptr>, !cir.vector<4 x !cir.int>){{.*}} // LLVM-LABEL: @test_mm_mask_compressstoreu_epi32 // LLVM: @llvm.masked.compressstore.v4i32(<4 x i32> %{{.*}}, ptr %{{.*}}, <4 x i1> %{{.*}}) // OGCG-LABEL: @test_mm_mask_compressstoreu_epi32 // OGCG: @llvm.masked.compressstore.v4i32(<4 x i32> %{{.*}}, ptr %{{.*}}, <4 x i1> %{{.*}}) return _mm_mask_compressstoreu_epi32(__P, __U, __A); } void test_mm256_mask_compressstoreu_epi32(void *__P, __mmask8 __U, __m256i __A) { // CIR-LABEL: _mm256_mask_compressstoreu_epi32 // CIR: cir.call_llvm_intrinsic "masked.compressstore" %{{.*}}, %{{.*}}, %{{.*}} : (!cir.vector<8 x !s32i>, !cir.ptr>, !cir.vector<8 x !cir.int>){{.*}} // LLVM-LABEL: @test_mm256_mask_compressstoreu_epi32 // LLVM: @llvm.masked.compressstore.v8i32(<8 x i32> %{{.*}}, ptr %{{.*}}, <8 x i1> %{{.*}}) // OGCG-LABEL: @test_mm256_mask_compressstoreu_epi32 // OGCG: @llvm.masked.compressstore.v8i32(<8 x i32> %{{.*}}, ptr %{{.*}}, <8 x i1> %{{.*}}) return _mm256_mask_compressstoreu_epi32(__P, __U, __A); }