forked from OSchip/llvm-project
[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.
This commit is contained in:
parent
38c356176b
commit
0f04ffc073
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue