[PATCH] D82005: [InstCombine] Replace selects with Phis
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 17 21:35:48 PDT 2020
mkazantsev added a comment.
In D82005#2098196 <https://reviews.llvm.org/D82005#2098196>, @spatel wrote:
> I'm not sure what direction we want to take this, but forming phis out of selects may conflict with SimplifyCFG. It can create select from phi in cases like this:
There is no contradiction here. It's OK to turn Phi into select if we also reduce number of blocks. Add volatile stores to every branch of your example and SimplifyCFG will stop working.
But Select into a Phi provides opportunity for redundancy elimination (see my comment above) and will potentially help Jump Threading.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82005/new/
https://reviews.llvm.org/D82005
More information about the llvm-commits
mailing list