[llvm] 0d5d5a7 - [SVE] Remove usages of VectorType::getNumElements() from PowerPC

Christopher Tetreault via llvm-commits llvm-commits at lists.llvm.org
Fri May 15 12:31:17 PDT 2020


Author: Christopher Tetreault
Date: 2020-05-15T12:30:56-07:00
New Revision: 0d5d5a75e21fea2154fab87cafb76024bf3858e6

URL: https://github.com/llvm/llvm-project/commit/0d5d5a75e21fea2154fab87cafb76024bf3858e6
DIFF: https://github.com/llvm/llvm-project/commit/0d5d5a75e21fea2154fab87cafb76024bf3858e6.diff

LOG: [SVE] Remove usages of VectorType::getNumElements() from PowerPC

Reviewers: efriedma, sdesmalen, c-rhodes, hfinkel

Reviewed By: c-rhodes

Subscribers: wuzish, nemanjai, tschuett, hiraditya, kbarton, rkruppe, psnobl, shchenz, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D79821

Added: 
    

Modified: 
    llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp b/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
index 68a1d4321dd6..fb81313c8053 100644
--- a/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
+++ b/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
@@ -912,7 +912,8 @@ int PPCTTIImpl::getMemoryOpCost(unsigned Opcode, Type *Src,
   // stores, loads are expanded using the vector-load + permutation sequence,
   // which is much less expensive).
   if (Src->isVectorTy() && Opcode == Instruction::Store)
-    for (int i = 0, e = cast<VectorType>(Src)->getNumElements(); i < e; ++i)
+    for (int i = 0, e = cast<FixedVectorType>(Src)->getNumElements(); i < e;
+         ++i)
       Cost += getVectorInstrCost(Instruction::ExtractElement, Src, i);
 
   return Cost;


        


More information about the llvm-commits mailing list