[PATCH] D82005: [InstCombine] Replace selects with Phis
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 21 21:50:08 PDT 2020
mkazantsev marked an inline comment as done.
mkazantsev added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp:2466
+ m_Br(m_Not(m_Specific(Cond)), m_BasicBlock(TrueSucc),
+ m_BasicBlock(FalseSucc)))) {
+ IfTrue = Sel.getFalseValue();
----------------
mkazantsev wrote:
> nikic wrote:
> > This looks like dead code, as we canonicalize branch of not by swapping successors. Might change with D81089, but for now it should be fine to just drop it.
> WDYM dead code? This code is needed to initialize variables `TrueSucc` and `FalseSucc`.
By the moment when we process this Phi, we did not process its dominator block yet. So no, this branch will not be canonicalized when we are handling this one.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82005/new/
https://reviews.llvm.org/D82005
More information about the llvm-commits
mailing list