Xor'ing both sides of icmp by sign-bit is equivalent to swapping signedness of
authorNick Lewycky <nicholas@mxc.ca>
Sun, 17 Aug 2008 07:34:14 +0000 (07:34 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Sun, 17 Aug 2008 07:34:14 +0000 (07:34 +0000)
commit1b344bc9867fe030dc2860e7dcd89a3eed0b6599
treeb4fe34a4140add6b174e658986207d993bf055b6
parent95e4bd81d7ad15cb7610cfdb869e357b3909a313
Xor'ing both sides of icmp by sign-bit is equivalent to swapping signedness of
the predicate.

Also, make this optz'n apply in more cases where it's safe to do so.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54876 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp
test/Transforms/InstCombine/2008-08-17-ICmpXorSignbit.ll [new file with mode: 0644]