llvm/lib/Transforms
Sanjay Patel 3d039197d7 [InstCombine] optimize unsigned icmp of increment
Allows LLVM to optimize sequences like the following:

%add = add nuw i32 %x, 1
%cmp = icmp ugt i32 %add, %y

Into:

%cmp = icmp uge i32 %x, %y

Previously, only signed comparisons were being handled.

Decrements could also be handled, but 'sub nuw %x, 1' is currently canonicalized to
'add %x, -1' in InstCombineAddSub, losing the nuw flag. Removing that canonicalization
seems like it might have far-reaching ramifications so I kept this simple for now.

Patch by Matti Niemenmaa!

Differential Revision: https://reviews.llvm.org/D24700



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291975 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-13 23:25:46 +00:00
..
Coroutines
Hello
InstCombine [InstCombine] optimize unsigned icmp of increment 2017-01-13 23:25:46 +00:00
Instrumentation
IPO Apply clang-tidy's performance-unnecessary-value-param to LLVM. 2017-01-13 14:39:03 +00:00
ObjCARC
Scalar NewGVN: Move leaders around properly to ensure we have a canonical dominating leader. Fixes PR 31613. 2017-01-13 22:40:01 +00:00
Utils "Use" lambda captures which are otherwise only used in asserts. NFC 2017-01-13 21:02:41 +00:00
Vectorize Remove unused lambda captures. NFC 2017-01-13 17:12:16 +00:00
CMakeLists.txt
LLVMBuild.txt