[llvm] bf1df25 - [SLP] Use isValidElementType instead of (#87469)
    via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Apr  3 02:57:50 PDT 2024
    
    
  
Author: Han-Kuan Chen
Date: 2024-04-03T17:57:46+08:00
New Revision: bf1df250487584ec77b0ab567cd3cca5c2863270
URL: https://github.com/llvm/llvm-project/commit/bf1df250487584ec77b0ab567cd3cca5c2863270
DIFF: https://github.com/llvm/llvm-project/commit/bf1df250487584ec77b0ab567cd3cca5c2863270.diff
LOG: [SLP] Use isValidElementType instead of (#87469)
FixedVectorType::isValidElementType for consistency.
Added: 
    
Modified: 
    llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Removed: 
    
################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index 6e7dcb9fc63ed1..db052cec69f75d 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -8447,7 +8447,7 @@ BoUpSLP::getEntryCost(const TreeEntry *E, ArrayRef<Value *> VectorizedVals,
     else if (auto *IE = dyn_cast<InsertElementInst>(VL[0]))
       ScalarTy = IE->getOperand(1)->getType();
   }
-  if (!FixedVectorType::isValidElementType(ScalarTy))
+  if (!isValidElementType(ScalarTy))
     return InstructionCost::getInvalid();
   auto *VecTy = FixedVectorType::get(ScalarTy, VL.size());
   TTI::TargetCostKind CostKind = TTI::TCK_RecipThroughput;
        
    
    
More information about the llvm-commits
mailing list