[PATCH] D109817: [AggressiveInstCombine] Add `phi` nodes support to `TruncInstCombine`
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 13 04:30:02 PST 2022
lebedev.ri added a comment.
In D109817#3317534 <https://reviews.llvm.org/D109817#3317534>, @RKSimon wrote:
> In D109817#3184760 <https://reviews.llvm.org/D109817#3184760>, @lebedev.ri wrote:
>
>> I would recommend to proceed with this.
>
> @lebedev.ri Are you still happy with this patch?
Conceptually, yes.
Are there tests with switches, where the PHI node has multiple incoming edges from the same predecessor?
================
Comment at: llvm/lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp:160
+ for (auto *Op : Operands)
+ if (all_of(Stack, [Op](Value *V) { return Op != V; }))
+ Worklist.push_back(Op);
----------------
`Stack` should be a SetVector then.
Also, could use a comment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109817/new/
https://reviews.llvm.org/D109817
More information about the llvm-commits
mailing list