[llvm] 9cbe000 - [LV] Load/store/reduction type must be sized, assert it.
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 6 04:36:19 PST 2022
Author: Sander de Smalen
Date: 2022-01-06T12:35:27Z
New Revision: 9cbe000df269117905ee68a87800f1d96cfb9885
URL: https://github.com/llvm/llvm-project/commit/9cbe000df269117905ee68a87800f1d96cfb9885
DIFF: https://github.com/llvm/llvm-project/commit/9cbe000df269117905ee68a87800f1d96cfb9885.diff
LOG: [LV] Load/store/reduction type must be sized, assert it.
This addresses a suggestion by @nikic on D115356.
Added:
Modified:
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 30d34083959d2..a61efbf2460d2 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -5990,8 +5990,8 @@ void LoopVectorizationCostModel::collectElementTypesForWidening() {
if (auto *ST = dyn_cast<StoreInst>(&I))
T = ST->getValueOperand()->getType();
- if (!T->isSized())
- continue;
+ assert(T->isSized() &&
+ "Expected the load/store/recurrence type to be sized");
ElementTypesInLoop.insert(T);
}
More information about the llvm-commits
mailing list