[PATCH] D130173: [Matrix] Add assert to extractVector with undef values
Francis Visoiu Mistrih via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 26 11:17:06 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
thegameg marked an inline comment as done.
Closed by commit rG448a094d3e57: [Matrix] Add assert to catch extracted vectors with poison elements (authored by thegameg).
Changed prior to commit:
https://reviews.llvm.org/D130173?vs=446155&id=447772#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130173/new/
https://reviews.llvm.org/D130173
Files:
llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
Index: llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
+++ llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
@@ -338,6 +338,9 @@
Value *extractVector(unsigned I, unsigned J, unsigned NumElts,
IRBuilder<> &Builder) const {
Value *Vec = isColumnMajor() ? getColumn(J) : getRow(I);
+ assert(cast<FixedVectorType>(Vec->getType())->getNumElements() >=
+ NumElts &&
+ "Extracted vector will contain poison values");
return Builder.CreateShuffleVector(
Vec, createSequentialMask(isColumnMajor() ? I : J, NumElts, 0),
"block");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130173.447772.patch
Type: text/x-patch
Size: 753 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220726/e846ee84/attachment.bin>
More information about the llvm-commits
mailing list