forked from OSchip/llvm-project
[X86] A small fix in X86/X86TargetTransformInfo.cpp: check a value type is simple before calling getSimpleVT().
llvm-svn: 251538
This commit is contained in:
parent
b704b69e0b
commit
da4e8aeec6
|
@ -895,8 +895,9 @@ int X86TTIImpl::getMaskedMemoryOpCost(unsigned Opcode, Type *SrcTy,
|
|||
|
||||
// Legalize the type.
|
||||
std::pair<int, MVT> LT = TLI->getTypeLegalizationCost(DL, SrcVTy);
|
||||
auto VT = TLI->getValueType(DL, SrcVTy);
|
||||
int Cost = 0;
|
||||
if (LT.second != TLI->getValueType(DL, SrcVTy).getSimpleVT() &&
|
||||
if (VT.isSimple() && LT.second != VT.getSimpleVT() &&
|
||||
LT.second.getVectorNumElements() == NumElem)
|
||||
// Promotion requires expand/truncate for data and a shuffle for mask.
|
||||
Cost += getShuffleCost(TTI::SK_Alternate, SrcVTy, 0, nullptr) +
|
||||
|
|
Loading…
Reference in New Issue