Skip to content

Commit 49fd24f

Browse files
Clean up usages of asserting vector getters in Type
Summary: Remove usages of asserting vector getters in Type in preparation for the VectorType refactor. The existence of these functions complicates the refactor while adding little value. Reviewers: hfinkel, efriedma, sdesmalen Reviewed By: efriedma Subscribers: wuzish, nemanjai, hiraditya, kbarton, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77266
1 parent b0bdaf9 commit 49fd24f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ int PPCTTIImpl::getMemoryOpCost(unsigned Opcode, Type *Src,
901901
// stores, loads are expanded using the vector-load + permutation sequence,
902902
// which is much less expensive).
903903
if (Src->isVectorTy() && Opcode == Instruction::Store)
904-
for (int i = 0, e = Src->getVectorNumElements(); i < e; ++i)
904+
for (int i = 0, e = cast<VectorType>(Src)->getNumElements(); i < e; ++i)
905905
Cost += getVectorInstrCost(Instruction::ExtractElement, Src, i);
906906

907907
return Cost;

0 commit comments

Comments
 (0)