You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement builtin extractf, tests are from
clang/test/CodeGen/X86/avx512f-builtins.c.
Added a new type constraint "element or vector of element" since
LLVMIR also has said constraint. The new getBoolMaskValue is because the
existing SelectOp already accepts only a boolean condition; it'd make
more sense for it to accept a vector of boolean instead of a vector of
i32.
// CIR: cir.select if %{{.*}} then %{{.*}} else %{{.*}} : (!cir.vector<4 x !cir.bool>, !cir.vector<4 x !cir.double>, !cir.vector<4 x !cir.double>) -> !cir.vector<4 x !cir.double>
718
+
719
+
// LLVM-LABEL: test_mm512_mask_extractf64x4_pd
720
+
// LLVM: shufflevector <8 x double> %{{.*}}, <8 x double> poison, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
721
+
// LLVM: select <4 x i1> %{{.*}}, <4 x double> %{{.*}}, <4 x double> %{{.*}}
722
+
723
+
// OGCG-LABEL: test_mm512_mask_extractf64x4_pd
724
+
// OGCG: shufflevector <8 x double> %{{.*}}, <8 x double> poison, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
725
+
// OGCG: select <4 x i1> %{{.*}}, <4 x double> %{{.*}}, <4 x double> %{{.*}}
// CIR: cir.select if %{{.*}} then %{{.*}} else %{{.*}} : (!cir.vector<4 x !cir.bool>, !cir.vector<4 x !cir.double>, !cir.vector<4 x !cir.double>) -> !cir.vector<4 x !cir.double>
734
+
735
+
// LLVM-LABEL: test_mm512_maskz_extractf64x4_pd
736
+
// LLVM: shufflevector <8 x double> %{{.*}}, <8 x double> poison, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
737
+
// LLVM: select <4 x i1> %{{.*}}, <4 x double> %{{.*}}, <4 x double> %{{.*}}
738
+
739
+
// OGCG-LABEL: test_mm512_maskz_extractf64x4_pd
740
+
// OGCG: shufflevector <8 x double> %{{.*}}, <8 x double> poison, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
741
+
// OGCG: select <4 x i1> %{{.*}}, <4 x double> %{{.*}}, <4 x double> %{{.*}}
742
+
return_mm512_maskz_extractf64x4_pd( __U, __A, 1);
743
+
}
744
+
745
+
__m128test_mm512_extractf32x4_ps(__m512a)
746
+
{
747
+
// CIR-LABEL: test_mm512_extractf32x4_ps
748
+
// CIR: [[POISON:%.*]] = cir.const #cir.poison : !cir.vector<16 x !cir.float>
// CIR: cir.select if %{{.*}} then %{{.*}} else %{{.*}} : (!cir.vector<4 x !cir.bool>, !cir.vector<4 x !s32i>, !cir.vector<4 x !s32i>) -> !cir.vector<4 x !s32i>
807
+
808
+
// LLVM-LABEL: test_mm512_mask_extracti32x4_epi32
809
+
// LLVM: shufflevector <16 x i32> %{{.*}}, <16 x i32> poison, <4 x i32> <i32 12, i32 13, i32 14, i32 15>
810
+
// LLVM: select <4 x i1> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}}
811
+
812
+
// OGCG-LABEL: test_mm512_mask_extracti32x4_epi32
813
+
// OGCG: shufflevector <16 x i32> %{{.*}}, <16 x i32> poison, <4 x i32> <i32 12, i32 13, i32 14, i32 15>
814
+
// OGCG: select <4 x i1> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}}
// CIR: cir.select if %{{.*}} then %{{.*}} else %{{.*}} : (!cir.vector<4 x !cir.bool>, !cir.vector<4 x !s32i>, !cir.vector<4 x !s32i>) -> !cir.vector<4 x !s32i>
0 commit comments