summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/icmp-add.ll
Commit message (Collapse)AuthorAgeFilesLines
* [InstCombine] Add new tests for icmp ugt/ult (add nuw X, C2), CNicola Zaghen2018-08-211-0/+43
| | | | | | Differential Revision: https://reviews.llvm.org/D51040 llvm-svn: 340284
* [InstCombine] Remove a FIXME from a test that was fixed in r314025.Craig Topper2017-09-221-1/+0
| | | | llvm-svn: 314030
* [InstCombine] Add constant splat handling to one of the ICMP_SLT/SGT cases ↵Craig Topper2017-09-221-2/+39
| | | | | | in foldICmpUsingKnownBits. llvm-svn: 314025
* [InstCombine] add nsw/nuw X, signbit --> or X, signbitSanjay Patel2017-02-181-6/+4
| | | | | | | | | Changing to 'or' (rather than 'xor' when no wrapping flags are set) allows icmp simplifies to happen as expected. Differential Revision: https://reviews.llvm.org/D29729 llvm-svn: 295574
* [InstCombine] fold icmp sgt/slt (add nsw X, C2), C --> icmp sgt/slt X, (C - C2)Sanjay Patel2017-02-121-15/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | I found one special case of this transform for 'slt 0', so I removed that and added the general transform. Alive code to check correctness: Name: slt_no_overflow Pre: WillNotOverflowSignedSub(C1, C2) %a = add nsw i8 %x, C2 %b = icmp slt %a, C1 => %b = icmp slt %x, C1 - C2 Name: sgt_no_overflow Pre: WillNotOverflowSignedSub(C1, C2) %a = add nsw i8 %x, C2 %b = icmp sgt %a, C1 => %b = icmp sgt %x, C1 - C2 http://rise4fun.com/Alive/MH Differential Revision: https://reviews.llvm.org/D29774 llvm-svn: 294898
* [InstCombine] add tests for icmp with add nsw; NFCSanjay Patel2017-02-091-0/+123
| | | | llvm-svn: 294601
* [InstCombine] add tests to show information-losing add nsw/nuw transforms; NFCSanjay Patel2017-02-081-0/+24
| | | | llvm-svn: 294524
* [InstCombine] add test for missed vector icmp fold; NFCSanjay Patel2017-02-081-0/+108
Also, move the related existing scalar test to a renamed file where I'm planning to add more icmp-add tests. llvm-svn: 294487
OpenPOWER on IntegriCloud