[PATCH] D119855: [SLP]Fix vectorization of the alternate cmp instruction with swapped predicates.
Anton Afanasyev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 16 10:57:35 PST 2022
anton-afanasyev accepted this revision.
anton-afanasyev added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:5561
E->Scalars, E->ReorderIndices, E->ReuseShuffleIndices,
[E](Instruction *I) {
assert(E->isOpcodeOrAlt(I) && "Unexpected main/alternate opcode");
----------------
May be not for this quick fix, but I would make a `static bool IsAltOp()` to prevent copy/paste from `getEntryCost()` to `vectorize()`, or even inlined it to `buildShuffleEntryMask()` itself, since it isn't used anywhere.
Also, typo: `buildSuffleEntryMask()` -> `buildShuffleEntryMask()`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119855/new/
https://reviews.llvm.org/D119855
More information about the llvm-commits
mailing list