Teach instcombine to preserve the nsw bit by doing an after-the-fact analysis
authorNick Lewycky <nicholas@mxc.ca>
Sun, 14 Aug 2011 01:45:19 +0000 (01:45 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Sun, 14 Aug 2011 01:45:19 +0000 (01:45 +0000)
commitdaf27ea899fbd94a020cc6f4680279ea0ac65064
treedf4e6aeb92f75c1fa736f93ac547d6b8dbb6bbef
parent2ed7464c09d04d9a35f50f0981482878edc0065f
Teach instcombine to preserve the nsw bit by doing an after-the-fact analysis
when combining add and sub instructions. Patch by Pranav Bhandarkar!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137570 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstructionCombining.cpp
test/Transforms/InstCombine/nsw.ll