[PATCH] D82218: [SVE] Remove calls to VectorType::getNumElements from AggressiveInstCombine
Christopher Tetreault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 20 21:16:36 PDT 2020
ctetreau updated this revision to Diff 279366.
ctetreau added a comment.
rebase
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82218/new/
https://reviews.llvm.org/D82218
Files:
llvm/lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp
Index: llvm/lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp
===================================================================
--- llvm/lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp
+++ llvm/lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp
@@ -291,7 +291,8 @@
assert(Ty && !Ty->isVectorTy() && "Expect Scalar Type");
if (auto *VTy = dyn_cast<VectorType>(V->getType())) {
// FIXME: should this handle scalable vectors?
- return FixedVectorType::get(Ty, VTy->getNumElements());
+ return FixedVectorType::get(Ty,
+ cast<FixedVectorType>(VTy)->getNumElements());
}
return Ty;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82218.279366.patch
Type: text/x-patch
Size: 661 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200721/ddf362e2/attachment-0001.bin>
More information about the llvm-commits
mailing list