[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 Aug 30 00:21:46 PDT 2018


craig.topper updated this revision to Diff 163271.
craig.topper marked 5 inline comments as done.
craig.topper added a comment.

Address review comments.

Not sure about the metadata copying. I'm not sure if I can rely on LHS and RHS to be in the same order as the original select.


Repository:
  rL LLVM

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.163271.patch
Type: text/x-patch
Size: 16028 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180830/6e8f0bd5/attachment.bin>


More information about the llvm-commits mailing list