[llvm] 4bde7c5 - [NFC] Use VectorType::isScalable to align with ongoing VectorType refactor.

Huihui Zhang via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 12 15:39:50 PDT 2020


Author: Huihui Zhang
Date: 2020-04-12T15:39:13-07:00
New Revision: 4bde7c5986eeae03e86b5531696146fb97acafde

URL: https://github.com/llvm/llvm-project/commit/4bde7c5986eeae03e86b5531696146fb97acafde
DIFF: https://github.com/llvm/llvm-project/commit/4bde7c5986eeae03e86b5531696146fb97acafde.diff

LOG: [NFC] Use VectorType::isScalable to align with ongoing VectorType refactor.

Added: 
    

Modified: 
    llvm/lib/Analysis/BasicAliasAnalysis.cpp
    llvm/lib/Transforms/Utils/VNCoercion.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Analysis/BasicAliasAnalysis.cpp b/llvm/lib/Analysis/BasicAliasAnalysis.cpp
index 338e45ad4a3c..04a3a5487d39 100644
--- a/llvm/lib/Analysis/BasicAliasAnalysis.cpp
+++ b/llvm/lib/Analysis/BasicAliasAnalysis.cpp
@@ -534,7 +534,7 @@ bool BasicAAResult::DecomposeGEPExpression(const Value *V,
     // Don't attempt to analyze GEPs if index scale is not a compile-time
     // constant.
     Type *SrcEleTy = GEPOp->getSourceElementType();
-    if (SrcEleTy->isVectorTy() && SrcEleTy->getVectorIsScalable()) {
+    if (SrcEleTy->isVectorTy() && cast<VectorType>(SrcEleTy)->isScalable()) {
       Decomposed.Base = V;
       Decomposed.HasCompileTimeConstantScale = false;
       return false;

diff  --git a/llvm/lib/Transforms/Utils/VNCoercion.cpp b/llvm/lib/Transforms/Utils/VNCoercion.cpp
index 0c05c2969603..bb8ac33d446a 100644
--- a/llvm/lib/Transforms/Utils/VNCoercion.cpp
+++ b/llvm/lib/Transforms/Utils/VNCoercion.cpp
@@ -12,7 +12,7 @@ namespace VNCoercion {
 
 static bool isFirstClassAggregateOrScalableType(Type *Ty) {
   return Ty->isStructTy() || Ty->isArrayTy() ||
-         (Ty->isVectorTy() && Ty->getVectorIsScalable());
+         (Ty->isVectorTy() && cast<VectorType>(Ty)->isScalable());
 }
 
 /// Return true if coerceAvailableValueToLoadType will succeed.


        


More information about the llvm-commits mailing list