[InstCombine] Add foldAndOfICmps test cases inspired by PR42691.
authorCraig Topper <craig.topper@intel.com>
Mon, 22 Jul 2019 02:43:43 +0000 (02:43 +0000)
committerCraig Topper <craig.topper@intel.com>
Mon, 22 Jul 2019 02:43:43 +0000 (02:43 +0000)
commitee5dc7e7ad8b8ad6b28b374e151aadb97bd8031c
tree7fe5951a988c95c9c2da56b30d51b7f8cf9cb1a9
parent3d68adebc579720a3914d50e77a413773be34f16
[InstCombine] Add foldAndOfICmps test cases inspired by PR42691.

icmp ne %x, INT_MIN can be treated similarly to icmp sgt %x, INT_MIN.
icmp ne %x, INT_MAX can be treated similarly to icmp slt %x, INT_MAX.
icmp ne %x, UINT_MAX can be treated similarly to icmp ult %x, UINT_MAX.

We already treat icmp ne %x, 0 similarly to icmp ugt %x, 0

llvm-svn: 366662
llvm/test/Transforms/InstCombine/and-or-icmps.ll