[PATCH] D77755: [SVE] Remove calls to isScalable from CodeGen
Christopher Tetreault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 8 15:13:51 PDT 2020
ctetreau created this revision.
Herald added subscribers: llvm-commits, psnobl, rkruppe, hiraditya, tschuett.
Herald added a reviewer: efriedma.
Herald added a project: LLVM.
ctetreau added reviewers: sdesmalen, stoklund, sunfish.
ctetreau added a comment.
While immediate feedback would be greatly appreciated, this commit won't actually build until D77587 <https://reviews.llvm.org/D77587> is merged. I'll ping the thread when this happens if this commit hasn't been accepted yet.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D77755
Files:
llvm/lib/CodeGen/CodeGenPrepare.cpp
llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
llvm/lib/CodeGen/ValueTypes.cpp
llvm/unittests/CodeGen/ScalableVectorMVTsTest.cpp
Index: llvm/unittests/CodeGen/ScalableVectorMVTsTest.cpp
===================================================================
--- llvm/unittests/CodeGen/ScalableVectorMVTsTest.cpp
+++ llvm/unittests/CodeGen/ScalableVectorMVTsTest.cpp
@@ -114,7 +114,7 @@
Type *Ty = Enxv4f64.getTypeForEVT(Ctx);
VectorType *ScV4Float64Ty = cast<VectorType>(Ty);
- ASSERT_TRUE(ScV4Float64Ty->isScalable());
+ ASSERT_TRUE(isa<ScalableVectorType>(ScV4Float64Ty));
ASSERT_EQ(Enxv4f64.getVectorElementCount(), ScV4Float64Ty->getElementCount());
ASSERT_EQ(Enxv4f64.getScalarType().getTypeForEVT(Ctx),
ScV4Float64Ty->getElementType());
Index: llvm/lib/CodeGen/ValueTypes.cpp
===================================================================
--- llvm/lib/CodeGen/ValueTypes.cpp
+++ llvm/lib/CodeGen/ValueTypes.cpp
@@ -103,11 +103,11 @@
}
bool EVT::isExtendedFixedLengthVector() const {
- return isExtendedVector() && !cast<VectorType>(LLVMTy)->isScalable();
+ return isExtendedVector() && isa<FixedVectorType>(LLVMTy);
}
bool EVT::isExtendedScalableVector() const {
- return isExtendedVector() && cast<VectorType>(LLVMTy)->isScalable();
+ return isExtendedVector() && isa<ScalableVectorType>(LLVMTy);
}
EVT EVT::getExtendedVectorElementType() const {
Index: llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
+++ llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
@@ -161,7 +161,7 @@
// Scalable vectors may need a special StackID to distinguish
// them from other (fixed size) stack objects.
- if (Ty->isVectorTy() && cast<VectorType>(Ty)->isScalable())
+ if (isa<ScalableVectorType>(Ty))
MF->getFrameInfo().setStackID(FrameIndex,
TFI->getStackIDForScalableVectors());
Index: llvm/lib/CodeGen/CodeGenPrepare.cpp
===================================================================
--- llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -6840,7 +6840,7 @@
// 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() && cast<VectorType>(StoreType)->isScalable())
+ if (isa<ScalableVectorType>(StoreType))
return false;
if (!DL.typeSizeEqualsStoreSize(StoreType) ||
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77755.256118.patch
Type: text/x-patch
Size: 2490 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200408/98566463/attachment.bin>
More information about the llvm-commits
mailing list