commit | 59b11c415eb90861223477841913cf7d35b1a1a4 | [log] [tgz] |
---|---|---|
author | David Majnemer <david.majnemer@gmail.com> | Thu Apr 11 20:05:46 2013 +0000 |
committer | David Majnemer <david.majnemer@gmail.com> | Thu Apr 11 20:05:46 2013 +0000 |
tree | 734dbc1186e46b57150b128c84cb64b8c3b58c99 | |
parent | efc8740647eeabbb1bd4fe876859ece47a6af9c1 [diff] |
Optimize icmp involving addition better Allows LLVM to optimize sequences like the following: %add = add nsw i32 %x, 1 %cmp = icmp sgt i32 %add, %y into: %cmp = icmp sge i32 %x, %y as well as: %add1 = add nsw i32 %x, 20 %add2 = add nsw i32 %y, 57 %cmp = icmp sge i32 %add1, %add2 into: %add = add nsw i32 %y, 37 %cmp = icmp sle i32 %cmp, %x git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179316 91177308-0d34-0410-b5e6-96231b3b80d8