Also fold (A+B) == A -> B == 0 when the add is commuted.
authorBenjamin Kramer <benny.kra@googlemail.com>
Fri, 11 Feb 2011 21:46:48 +0000 (21:46 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Fri, 11 Feb 2011 21:46:48 +0000 (21:46 +0000)
commitb6c8cb442298c79b1319078b3038156466be0c40
tree4ce5fab6d5e69ff7f76d27f1ff82ae038d62b7d6
parent1021236c74dcc4beb294ebe675032ff578fae17f
Also fold (A+B) == A -> B == 0 when the add is commuted.

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