[PATCH] D83284: [InstCombine] Improve select -> phi canonicalization: consider more blocks

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 7 01:45:57 PDT 2020


mkazantsev created this revision.
mkazantsev added reviewers: nikic, lebedev.ri, fhahn, asbirlea.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

We can try to replace select with a Phi not in its parent block alone, but also in blocks of its arguments.
We benefit from it when select's argument is a Phi.


https://reviews.llvm.org/D83284

Files:
  llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
  llvm/test/Transforms/InstCombine/select.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83284.275943.patch
Type: text/x-patch
Size: 7121 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200707/80103b15/attachment.bin>


More information about the llvm-commits mailing list