[PATCH] D149627: [NFC][SLP] Cleanup: Simplify traversal loop in SLPVectorizerPass::vectorizeHorReduction().
Vasileios Porpodas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 2 14:55:51 PDT 2023
vporpo added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:14083
+ if (!FutureSeed)
+ break;
}
----------------
ABataev wrote:
> vporpo wrote:
> > ABataev wrote:
> > > Why break here?
> > This can only happen if Inst is the root node and at this point `Stack` is empty so it effectively breaks out of the loop, so it is better to be explicit about it.
> Add an `assert(Stack.empty())` here and check with at least Spec that it does not crash
I checked with Spec 2017 and our presubmit tests and Stack is always empty.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149627/new/
https://reviews.llvm.org/D149627
More information about the llvm-commits
mailing list