diff options
author | Christopher Tetreault <ctetreau@quicinc.com> | 2020-04-10 14:23:20 -0700 |
---|---|---|
committer | Christopher Tetreault <ctetreau@quicinc.com> | 2020-04-10 14:53:43 -0700 |
commit | 889f6606ed54878bfcbcc6431d7eae59b05923bf (patch) | |
tree | 7b5d4caf22373d4d730a852294a3195e664e819d /llvm/lib/CodeGen/CodeGenPrepare.cpp | |
parent | 33f76e2381b48b58c60e689a1ca2acc59fd6dfa2 (diff) | |
download | llvm-889f6606ed54878bfcbcc6431d7eae59b05923bf.zip llvm-889f6606ed54878bfcbcc6431d7eae59b05923bf.tar.gz llvm-889f6606ed54878bfcbcc6431d7eae59b05923bf.tar.bz2 |
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: stoklund, sdesmalen, efriedma
Reviewed By: sdesmalen
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77272
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
-rw-r--r-- | llvm/lib/CodeGen/CodeGenPrepare.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp index 1654eba..3a24765 100644 --- a/llvm/lib/CodeGen/CodeGenPrepare.cpp +++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp @@ -6577,7 +6577,7 @@ class VectorPromoteHelper { UseSplat = true; } - ElementCount EC = getTransitionType()->getVectorElementCount(); + ElementCount EC = cast<VectorType>(getTransitionType())->getElementCount(); if (UseSplat) return ConstantVector::getSplat(EC, Val); @@ -6840,7 +6840,7 @@ static bool splitMergedValStore(StoreInst &SI, const DataLayout &DL, // whereas scalable vectors would have to be shifted by // <2log(vscale) + number of bits> in order to store the // low/high parts. Bailing out for now. - if (StoreType->isVectorTy() && StoreType->getVectorIsScalable()) + if (StoreType->isVectorTy() && cast<VectorType>(StoreType)->isScalable()) return false; if (!DL.typeSizeEqualsStoreSize(StoreType) || |