[PATCH] D149993: [SLP][NFC] Cleanup: Separate vectorization of Inserts and CmpInsts.
Vasileios Porpodas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 5 14:04:39 PDT 2023
vporpo added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:14732-14736
+ if (it->isTerminator()) {
+ OpsChanged |= vectorizeCmpInsts(reverse(PostProcessCmps), BB, R);
+ PostProcessCmps.clear();
+ }
+ PostProcessInserts.clear();
----------------
ABataev wrote:
> You have to duplicate the same code, which is more complex than before
The check for `it->isTerminator()` controls whether we vectorize CmpInsts. Hiding it within `vectorizeSimpleInstructions` is just confusing and makes it harder to read.
To avoid repeating the code we can use a lambda for this, but the separation of vectorizing Inserts and CmpInsts should be clear. Wdyt?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149993/new/
https://reviews.llvm.org/D149993
More information about the llvm-commits
mailing list