aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/ResetMachineFunctionPass.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2017-01-13 23:25:46 +0000
committerSanjay Patel <spatel@rotateright.com>2017-01-13 23:25:46 +0000
commit40f401776b3837b2d0f42517777fbb6d1de82413 (patch)
tree8da7450cee1d7d665d0f2bf384e07218e29f74af /llvm/lib/CodeGen/ResetMachineFunctionPass.cpp
parente61f9f9949a435d8396613b46c6ed7b65d61602b (diff)
downloadllvm-40f401776b3837b2d0f42517777fbb6d1de82413.zip
llvm-40f401776b3837b2d0f42517777fbb6d1de82413.tar.gz
llvm-40f401776b3837b2d0f42517777fbb6d1de82413.tar.bz2
[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 llvm-svn: 291975
Diffstat (limited to 'llvm/lib/CodeGen/ResetMachineFunctionPass.cpp')
0 files changed, 0 insertions, 0 deletions