diff options
author | Craig Topper <craig.topper@intel.com> | 2019-11-12 12:26:18 -0800 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2019-11-12 14:56:01 -0800 |
commit | 0f04ffc073deeb1738f1d9bd5c8161d13fe42592 (patch) | |
tree | 29c31dcb20b890745e6d5b93a9cfd7fa2d54afff | |
parent | 38c356176b5370164578c1d08e984964354b7189 (diff) | |
download | bcm5719-llvm-0f04ffc073deeb1738f1d9bd5c8161d13fe42592.tar.gz bcm5719-llvm-0f04ffc073deeb1738f1d9bd5c8161d13fe42592.zip |
[X86] Only pass v64i8/v32i16 as v16i32 on non-avx512bw targets if the v16i32 type won't be split by prefer-vector-width=256
Otherwise just let the v64i8/v32i16 types be split to v32i8/v16i16.
In reality this shouldn't happen because it means we have a 512-bit
vector argument, but min-legal-vector-width says a value less than
512. But a 512-bit argument should have been factored into the
preferred vector width.
-rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 87ff5f95b16..df5e16c6a54 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -1938,8 +1938,8 @@ MVT X86TargetLowering::getRegisterTypeForCallingConv(LLVMContext &Context, (VT.getVectorNumElements() > 64 && Subtarget.hasBWI()))) return MVT::i8; // FIXME: Should we just make these types legal and custom split operations? - if ((VT == MVT::v32i16 || VT == MVT::v64i8) && - Subtarget.hasAVX512() && !Subtarget.hasBWI() && !EnableOldKNLABI) + if ((VT == MVT::v32i16 || VT == MVT::v64i8) && !EnableOldKNLABI && + Subtarget.useAVX512Regs() && !Subtarget.hasBWI()) return MVT::v16i32; return TargetLowering::getRegisterTypeForCallingConv(Context, CC, VT); } @@ -1958,8 +1958,8 @@ unsigned X86TargetLowering::getNumRegistersForCallingConv(LLVMContext &Context, (VT.getVectorNumElements() > 64 && Subtarget.hasBWI()))) return VT.getVectorNumElements(); // FIXME: Should we just make these types legal and custom split operations? - if ((VT == MVT::v32i16 || VT == MVT::v64i8) && - Subtarget.hasAVX512() && !Subtarget.hasBWI() && !EnableOldKNLABI) + if ((VT == MVT::v32i16 || VT == MVT::v64i8) && !EnableOldKNLABI && + Subtarget.useAVX512Regs() && !Subtarget.hasBWI()) return 1; return TargetLowering::getNumRegistersForCallingConv(Context, CC, VT); } |