Fix build issue caused by f693f915a07eca94a3faeadc3b5dad59fc0eb1de
authorDavid Sherwood <david.sherwood@arm.com>
Mon, 19 Oct 2020 09:44:17 +0000 (10:44 +0100)
committerDavid Sherwood <david.sherwood@arm.com>
Mon, 19 Oct 2020 10:06:33 +0000 (11:06 +0100)
llvm/include/llvm/CodeGen/BasicTTIImpl.h

index adb3c68..abcd612 100644 (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.