[PATCH] D78430: [InstSimplify] fold and/or of compares with equality to min/max constant

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 20 08:05:26 PDT 2020


spatel updated this revision to Diff 258744.
spatel marked 3 inline comments as done.
spatel added a comment.

Patch updated:

1. Allow null pointer constant as a special-case of zero integer (added some negative tests, so the test file from rGa2eb55d <https://reviews.llvm.org/rGa2eb55de998f84cef9fe84328d4d3f9db72b69e3> shows up here).
2. Use positive 'IsAnd' variable to possibly make code clearer - and backwards justify that polarity choice :).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78430/new/

https://reviews.llvm.org/D78430

Files:
  llvm/lib/Analysis/InstructionSimplify.cpp
  llvm/test/Transforms/InstSimplify/and-or-icmp-min-max.ll
  llvm/test/Transforms/InstSimplify/and-or-icmp-nullptr.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78430.258744.patch
Type: text/x-patch
Size: 40274 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200420/ac18b281/attachment.bin>


More information about the llvm-commits mailing list