[PATCH] D145771: [LICM] Support logical AND/OR when hoisting min/max

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 10 01:06:15 PST 2023


mkazantsev created this revision.
mkazantsev added reviewers: nikic, fhahn, lebedev.ri.
Herald added subscribers: StephenFan, asbirlea, hiraditya.
Herald added a project: All.
mkazantsev requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

We can handle logical AND/OR in the same way as arithmetic AND/OR in case if
we can prove that `RHS2` (for which a new use will be introduced) is non-poison
at the point where it's used.


https://reviews.llvm.org/D145771

Files:
  llvm/lib/Transforms/Scalar/LICM.cpp
  llvm/test/Transforms/LICM/min_max.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145771.504051.patch
Type: text/x-patch
Size: 5318 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230310/9c8ce3ca/attachment.bin>


More information about the llvm-commits mailing list