[NFC][InstCombine] Tests for ((~x) + y) + 1 -> y - x fold fold (PR42459)
authorRoman Lebedev <lebedev.ri@gmail.com>
Mon, 1 Jul 2019 12:22:06 +0000 (12:22 +0000)
committerRoman Lebedev <lebedev.ri@gmail.com>
Mon, 1 Jul 2019 12:22:06 +0000 (12:22 +0000)
commitd5c3e34cb7ed17b38c1fae73fc9e65fdc7d28a28
tree84eb6412d3511758fc1b707f8b1f5d58e37cdf3a
parent4f0a37728052d999a9bbac4cd5d81b1f264567cd
[NFC][InstCombine] Tests for  ((~x) + y) + 1 -> y - x fold fold (PR42459)

To be noted, this pattern is not unhandled by instcombine per-se,
it is somehow does end up being folded when one runs opt -O3,
but not if it's just -instcombine. Regardless, that fold is
indirect, depends on some other folds, and is thus blind
when there are extra uses.

https://bugs.llvm.org/show_bug.cgi?id=42459
https://rise4fun.com/Alive/EPO0

llvm-svn: 364749
llvm/test/Transforms/InstCombine/fold-inc-of-add-of-not-x-and-y-to-sub-x-from-y.ll [new file with mode: 0644]