Files
archived-llvm/test/Transforms/InstCombine
Sanjay Patel 095a0b49b3 [InstCombine] fold icmp sgt/slt (add nsw X, C2), C --> icmp sgt/slt X, (C - C2)
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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294898 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-12 16:40:30 +00:00
..
2016-09-13 12:10:14 +00:00
2013-08-28 23:04:41 +00:00
2012-02-29 01:53:13 +00:00
2014-06-02 21:23:54 +00:00
2016-04-05 17:24:54 +00:00
2016-07-16 16:24:06 +00:00
2017-01-22 20:28:56 +00:00
2014-03-06 05:32:52 +00:00
2016-06-05 17:29:45 +00:00
2017-01-10 23:08:54 +00:00
2014-11-04 05:17:58 +00:00
2016-05-02 15:21:41 +00:00
2014-10-21 23:00:20 +00:00
2016-04-17 04:30:43 +00:00
2016-05-02 15:25:49 +00:00
2015-01-06 23:00:33 +00:00
2016-04-05 17:24:54 +00:00
2015-09-08 17:58:22 +00:00
2016-06-25 17:39:10 +00:00
2015-06-05 18:04:42 +00:00
2015-08-11 21:33:55 +00:00
2015-08-28 19:09:31 +00:00
2016-01-07 19:27:16 +00:00
2016-06-05 17:54:56 +00:00
2013-08-28 23:04:41 +00:00
2013-08-28 23:04:41 +00:00
2013-03-28 19:34:14 +00:00
2016-04-05 17:24:54 +00:00

This directory contains test cases for the instcombine transformation.  The
dated tests are actual bug tests, whereas the named tests are used to test
for features that the this pass should be capable of performing.