[X86] Add non-masked versions of vpconflict intrinsics so we can use a select in the header file in clang.

I'll remove and autoupgrade the old intrinsics in a future commit.

llvm-svn: 352172
This commit is contained in:
Craig Topper 2019-01-25 07:08:07 +00:00
parent 456d3798d6
commit 6fd9af587a
2 changed files with 32 additions and 12 deletions

View File

@ -4035,34 +4035,48 @@ let TargetPrefix = "x86" in {
// AVX-512 conflict detection instruction
// Instructions that count the number of leading zero bits
let TargetPrefix = "x86" in {
def int_x86_avx512_mask_conflict_d_128 :
GCCBuiltin<"__builtin_ia32_vpconflictsi_128_mask">,
def int_x86_avx512_conflict_d_128 :
GCCBuiltin<"__builtin_ia32_vpconflictsi_128">,
Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty], [IntrNoMem]>;
def int_x86_avx512_conflict_d_256 :
GCCBuiltin<"__builtin_ia32_vpconflictsi_256">,
Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty], [IntrNoMem]>;
def int_x86_avx512_conflict_d_512 :
GCCBuiltin<"__builtin_ia32_vpconflictsi_512">,
Intrinsic<[llvm_v16i32_ty], [llvm_v16i32_ty], [IntrNoMem]>;
def int_x86_avx512_conflict_q_128 :
GCCBuiltin<"__builtin_ia32_vpconflictdi_128">,
Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty], [IntrNoMem]>;
def int_x86_avx512_conflict_q_256 :
GCCBuiltin<"__builtin_ia32_vpconflictdi_256">,
Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty], [IntrNoMem]>;
def int_x86_avx512_conflict_q_512 :
GCCBuiltin<"__builtin_ia32_vpconflictdi_512">,
Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty], [IntrNoMem]>;
def int_x86_avx512_mask_conflict_d_128 : // FIXME: remove
Intrinsic<[llvm_v4i32_ty],
[llvm_v4i32_ty, llvm_v4i32_ty, llvm_i8_ty],
[IntrNoMem]>;
def int_x86_avx512_mask_conflict_d_256 :
GCCBuiltin<"__builtin_ia32_vpconflictsi_256_mask">,
def int_x86_avx512_mask_conflict_d_256 : // FIXME: remove
Intrinsic<[llvm_v8i32_ty],
[llvm_v8i32_ty, llvm_v8i32_ty, llvm_i8_ty],
[IntrNoMem]>;
def int_x86_avx512_mask_conflict_d_512 :
GCCBuiltin<"__builtin_ia32_vpconflictsi_512_mask">,
def int_x86_avx512_mask_conflict_d_512 : // FIXME: remove
Intrinsic<[llvm_v16i32_ty],
[llvm_v16i32_ty, llvm_v16i32_ty, llvm_i16_ty],
[IntrNoMem]>;
def int_x86_avx512_mask_conflict_q_128 :
GCCBuiltin<"__builtin_ia32_vpconflictdi_128_mask">,
def int_x86_avx512_mask_conflict_q_128 : // FIXME: remove
Intrinsic<[llvm_v2i64_ty],
[llvm_v2i64_ty, llvm_v2i64_ty, llvm_i8_ty],
[IntrNoMem]>;
def int_x86_avx512_mask_conflict_q_256 :
GCCBuiltin<"__builtin_ia32_vpconflictdi_256_mask">,
def int_x86_avx512_mask_conflict_q_256 : // FIXME: remove
Intrinsic<[llvm_v4i64_ty],
[llvm_v4i64_ty, llvm_v4i64_ty, llvm_i8_ty],
[IntrNoMem]>;
def int_x86_avx512_mask_conflict_q_512 :
GCCBuiltin<"__builtin_ia32_vpconflictdi_512_mask">,
def int_x86_avx512_mask_conflict_q_512 : // FIXME: remove
Intrinsic<[llvm_v8i64_ty],
[llvm_v8i64_ty, llvm_v8i64_ty, llvm_i8_ty],
[IntrNoMem]>;

View File

@ -419,6 +419,12 @@ static const IntrinsicData IntrinsicsWithoutChain[] = {
X86_INTRINSIC_DATA(avx512_cmp_ps_128, CMP_MASK_CC, X86ISD::CMPM, 0),
X86_INTRINSIC_DATA(avx512_cmp_ps_256, CMP_MASK_CC, X86ISD::CMPM, 0),
X86_INTRINSIC_DATA(avx512_cmp_ps_512, CMP_MASK_CC, X86ISD::CMPM, X86ISD::CMPM_RND),
X86_INTRINSIC_DATA(avx512_conflict_d_128, INTR_TYPE_1OP, X86ISD::CONFLICT, 0),
X86_INTRINSIC_DATA(avx512_conflict_d_256, INTR_TYPE_1OP, X86ISD::CONFLICT, 0),
X86_INTRINSIC_DATA(avx512_conflict_d_512, INTR_TYPE_1OP, X86ISD::CONFLICT, 0),
X86_INTRINSIC_DATA(avx512_conflict_q_128, INTR_TYPE_1OP, X86ISD::CONFLICT, 0),
X86_INTRINSIC_DATA(avx512_conflict_q_256, INTR_TYPE_1OP, X86ISD::CONFLICT, 0),
X86_INTRINSIC_DATA(avx512_conflict_q_512, INTR_TYPE_1OP, X86ISD::CONFLICT, 0),
X86_INTRINSIC_DATA(avx512_cvtsi2sd64, INTR_TYPE_3OP, X86ISD::SCALAR_SINT_TO_FP_RND, 0),
X86_INTRINSIC_DATA(avx512_cvtsi2ss32, INTR_TYPE_3OP, X86ISD::SCALAR_SINT_TO_FP_RND, 0),
X86_INTRINSIC_DATA(avx512_cvtsi2ss64, INTR_TYPE_3OP, X86ISD::SCALAR_SINT_TO_FP_RND, 0),