diff options
author | Christopher Tetreault <ctetreau@quicinc.com> | 2020-04-23 10:58:37 -0700 |
---|---|---|
committer | Christopher Tetreault <ctetreau@quicinc.com> | 2020-04-23 11:51:22 -0700 |
commit | 3ecced163f539dd04e86ba9dbf27e49bd89a4a11 (patch) | |
tree | eebbcd03db76998befeaed39a6927874ecd4fcf6 /llvm/lib/IR/Constants.cpp | |
parent | 757c7c244b70cb35269dfe95aa801fd0ea3c5a0c (diff) | |
download | llvm-3ecced163f539dd04e86ba9dbf27e49bd89a4a11.zip llvm-3ecced163f539dd04e86ba9dbf27e49bd89a4a11.tar.gz llvm-3ecced163f539dd04e86ba9dbf27e49bd89a4a11.tar.bz2 |
[SVE] Remove calls to isScalable from IR
Reviewers: efriedma, sdesmalen, dexonsmith, dblaikie
Reviewed By: sdesmalen
Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77691
Diffstat (limited to 'llvm/lib/IR/Constants.cpp')
-rw-r--r-- | llvm/lib/IR/Constants.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/IR/Constants.cpp b/llvm/lib/IR/Constants.cpp index d180059..5a3c6a4 100644 --- a/llvm/lib/IR/Constants.cpp +++ b/llvm/lib/IR/Constants.cpp @@ -241,7 +241,7 @@ bool Constant::isFiniteNonZeroFP() const { bool Constant::isNormalFP() const { if (auto *CFP = dyn_cast<ConstantFP>(this)) return CFP->getValueAPF().isNormal(); - auto *VTy = dyn_cast<VectorType>(getType()); + auto *VTy = dyn_cast<FixedVectorType>(getType()); if (!VTy) return false; for (unsigned i = 0, e = VTy->getNumElements(); i != e; ++i) { @@ -255,7 +255,7 @@ bool Constant::isNormalFP() const { bool Constant::hasExactInverseFP() const { if (auto *CFP = dyn_cast<ConstantFP>(this)) return CFP->getValueAPF().getExactInverse(nullptr); - auto *VTy = dyn_cast<VectorType>(getType()); + auto *VTy = dyn_cast<FixedVectorType>(getType()); if (!VTy) return false; for (unsigned i = 0, e = VTy->getNumElements(); i != e; ++i) { @@ -269,7 +269,7 @@ bool Constant::hasExactInverseFP() const { bool Constant::isNaN() const { if (auto *CFP = dyn_cast<ConstantFP>(this)) return CFP->isNaN(); - auto *VTy = dyn_cast<VectorType>(getType()); + auto *VTy = dyn_cast<FixedVectorType>(getType()); if (!VTy) return false; for (unsigned i = 0, e = VTy->getNumElements(); i != e; ++i) { @@ -644,7 +644,7 @@ Constant *Constant::replaceUndefsWith(Constant *C, Constant *Replacement) { } // Don't know how to deal with this constant. - auto *VTy = dyn_cast<VectorType>(Ty); + auto *VTy = dyn_cast<FixedVectorType>(Ty); if (!VTy) return C; @@ -2287,7 +2287,7 @@ Constant *ConstantExpr::getShuffleVector(Constant *V1, Constant *V2, unsigned NElts = Mask.size(); auto V1VTy = cast<VectorType>(V1->getType()); Type *EltTy = V1VTy->getElementType(); - bool TypeIsScalable = V1VTy->isScalable(); + bool TypeIsScalable = isa<ScalableVectorType>(V1VTy); Type *ShufTy = VectorType::get(EltTy, NElts, TypeIsScalable); if (OnlyIfReducedTy == ShufTy) |