[llvm] 81b7e21 - Fix build issue caused by f693f915a07eca94a3faeadc3b5dad59fc0eb1de

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 19 03:06:55 PDT 2020


Author: David Sherwood
Date: 2020-10-19T11:06:33+01:00
New Revision: 81b7e2141f18514079f9fbfcd50b25e5501e313c

URL: https://github.com/llvm/llvm-project/commit/81b7e2141f18514079f9fbfcd50b25e5501e313c
DIFF: https://github.com/llvm/llvm-project/commit/81b7e2141f18514079f9fbfcd50b25e5501e313c.diff

LOG: Fix build issue caused by f693f915a07eca94a3faeadc3b5dad59fc0eb1de

Added: 
    

Modified: 
    llvm/include/llvm/CodeGen/BasicTTIImpl.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/CodeGen/BasicTTIImpl.h b/llvm/include/llvm/CodeGen/BasicTTIImpl.h
index adb3c681ccc5..abcd612c7b55 100644
--- a/llvm/include/llvm/CodeGen/BasicTTIImpl.h
+++ b/llvm/include/llvm/CodeGen/BasicTTIImpl.h
@@ -943,7 +943,12 @@ class BasicTTIImplBase : public TargetTransformInfoImplCRTPBase<T> {
     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.


        


More information about the llvm-commits mailing list