[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
Thu Sep 6 10:14:05 PDT 2018


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

Pass a parameter to the lambda to indicate the LHS/RHS are swapped. Check this with an assert.


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.164236.patch
Type: text/x-patch
Size: 17334 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180906/caadc669/attachment.bin>


More information about the llvm-commits mailing list