For completeness, generalize the (X + Y) - Y -> X transform and add X - (X + 1) ...
authorDuncan Sands <baldrick@free.fr>
Tue, 18 Jan 2011 11:50:19 +0000 (11:50 +0000)
committerDuncan Sands <baldrick@free.fr>
Tue, 18 Jan 2011 11:50:19 +0000 (11:50 +0000)
commitb2f3c383ec62b959ee27d0a5fb890894c4e49e86
tree9e8fa6c36cc54ea8f971e2293d918371c8b05dd0
parentfe02c69f84ad52d42be934e4fe702f03e4991a6a
For completeness, generalize the (X + Y) - Y -> X transform and add X - (X + 1) -> -1.
These were not recommended by my auto-simplifier since they don't fire often enough.
However they do fire from time to time, for example they remove one subtraction from
the final bitcode for 483.xalancbmk.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123755 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/InstructionSimplify.cpp
test/Transforms/InstSimplify/2010-12-20-Reassociate.ll