Index: llvm/include/llvm/CodeGen/BasicTTIImpl.h =================================================================== --- llvm/include/llvm/CodeGen/BasicTTIImpl.h +++ llvm/include/llvm/CodeGen/BasicTTIImpl.h @@ -1204,7 +1204,7 @@ // 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(), + TypeSize::isKnownLT(DL.getTypeStoreSizeInBits(Src), 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