Fix build issue caused by f693f915a0

This commit is contained in:
David Sherwood 2020-10-19 10:44:17 +01:00
parent 8796746b2a
commit 81b7e2141f
1 changed files with 6 additions and 1 deletions

View File

@ -943,7 +943,12 @@ public:
if (CostKind != TTI::TCK_RecipThroughput)
return Cost;
if (Src->isVectorTy() && EVT::getEVT(Src).bitsLT(LT.second)) {
if (Src->isVectorTy() &&
// In practice it's not currently possible to have a change in lane
// length for extending loads or truncating stores so both types should
// have the same scalable property.
TypeSize::isKnownLT(Src->getPrimitiveSizeInBits(),
LT.second.getSizeInBits())) {
// This is a vector load that legalizes to a larger type than the vector
// itself. Unless the corresponding extending load or truncating store is
// legal, then this will scalarize.