[PATCH] D77266: Clean up usages of asserting vector getters in Type

Christopher Tetreault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 8 16:20:28 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG49fd24fe9e45: Clean up usages of asserting vector getters in Type (authored by ctetreau).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77266/new/

https://reviews.llvm.org/D77266

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


Index: llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
===================================================================
--- llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
+++ llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
@@ -901,7 +901,7 @@
   // 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 = Src->getVectorNumElements(); i < e; ++i)
+    for (int i = 0, e = cast<VectorType>(Src)->getNumElements(); i < e; ++i)
       Cost += getVectorInstrCost(Instruction::ExtractElement, Src, i);
 
   return Cost;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77266.256141.patch
Type: text/x-patch
Size: 664 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200408/8900ffa9/attachment.bin>


More information about the llvm-commits mailing list