[llvm] [SLP][NFC] Fix assertion in vectorizeGEPIndices() (PR #76660)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 31 06:17:32 PST 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-transforms
Author: Enna1 (Enna1)
<details>
<summary>Changes</summary>
The index constraints for the collected getelementptr instructions should be single **and** non-constant.
---
Full diff: https://github.com/llvm/llvm-project/pull/76660.diff
1 Files Affected:
- (modified) llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp (+1-1)
``````````diff
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index 6359dc65d22634..ced081d4291645 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -16224,7 +16224,7 @@ bool SLPVectorizerPass::vectorizeGEPIndices(BasicBlock *BB, BoUpSLP &R) {
for (auto *V : Candidates) {
auto *GEP = cast<GetElementPtrInst>(V);
auto *GEPIdx = GEP->idx_begin()->get();
- assert(GEP->getNumIndices() == 1 || !isa<Constant>(GEPIdx));
+ assert(GEP->getNumIndices() == 1 && !isa<Constant>(GEPIdx));
Bundle[BundleIndex++] = GEPIdx;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/76660
More information about the llvm-commits
mailing list