Recognize and simplify
authorAnders Carlsson <andersca@mac.com>
Sun, 30 Jan 2011 22:01:13 +0000 (22:01 +0000)
committerAnders Carlsson <andersca@mac.com>
Sun, 30 Jan 2011 22:01:13 +0000 (22:01 +0000)
commit77bc49e5e2e2a5e549d65bc0bedd86ff3df6b161
tree7f93923534f5f181e5ec3155cab6bbadc9d4caa9
parent8352062e52eed6e50786fdb89f5e601fdcbe0d90
Recognize and simplify

(A+B) == A  ->  B == 0
A == (A+B)  ->  B == 0

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