[PATCH] D51398: [InstCombine] Fold (min/max ~X, Y) -> ~(max/min X, ~Y) when Y is freely invertible

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 29 13:15:59 PDT 2018


craig.topper updated this revision to Diff 163168.
craig.topper added a comment.

Add comment. Use existing createMinMax helper to shorten some code.


https://reviews.llvm.org/D51398

Files:
  lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
  lib/Transforms/InstCombine/InstCombineSelect.cpp
  test/Transforms/InstCombine/max-of-nots.ll
  test/Transforms/InstCombine/select.ll
  test/Transforms/InstCombine/select_meta.ll
  test/Transforms/InstCombine/sub.ll
  test/Transforms/InstCombine/xor.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51398.163168.patch
Type: text/x-patch
Size: 13743 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180829/ba2d3cc4/attachment.bin>


More information about the llvm-commits mailing list