[PATCH] D92668: [SLP]Merge reorder and reuse shuffles.
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 7 06:27:41 PST 2020
ABataev added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:3510
}
}
int DeadCost = ReuseShuffleCost;
----------------
anton-afanasyev wrote:
>
I don't get it. What do you want to see here?
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:3513
+ if (!NeedToShuffleReuses && !E->ReorderIndices.empty())
DeadCost += TTI->getShuffleCost(
TargetTransformInfo::SK_PermuteSingleSrc, VecTy);
----------------
anton-afanasyev wrote:
> Here `+=` looks confusing, we can just set `DeadCost = ...`, since `DeadCost == 0`.
No, `DeadCost` is not `0`, it is `ReuseShuffleCost`
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:4634
- if (NeedToShuffleReuses)
- V = Builder.CreateShuffleVector(V, E->ReuseShuffleIndices, "shuffle");
----------------
anton-afanasyev wrote:
> Why do we ignore `ReuseShuffleIndices` here?
Because stores do not have uses, so this is actually just a dead code.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92668/new/
https://reviews.llvm.org/D92668
More information about the llvm-commits
mailing list