[PATCH] D77266: Clean up usages of asserting vector getters in Type
Christopher Tetreault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 7 15:16:57 PDT 2020
ctetreau updated this revision to Diff 255829.
ctetreau added a comment.
rebase, mention powerpc in commit message
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.255829.patch
Type: text/x-patch
Size: 664 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200407/65e52214/attachment.bin>
More information about the llvm-commits
mailing list