OSDN Git Service

[DAGCombiner] Teach DAGCombiner that A-(-B) is A+B.
authorCraig Topper <craig.topper@intel.com>
Thu, 19 Jul 2018 22:24:43 +0000 (22:24 +0000)
committerCraig Topper <craig.topper@intel.com>
Thu, 19 Jul 2018 22:24:43 +0000 (22:24 +0000)
commitf97a90d95826e0a1eb1e698d26dd57659d13c2bb
tree8aa2ea861b6719c5e3d53d2b5a1472e50eb1333d
parent91284ba1d6e02a5080deb71093251494bd51d08a
[DAGCombiner] Teach DAGCombiner that A-(-B) is A+B.

We already knew A+(-B) is A-B in visitAdd. This does the opposite for visitSub.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337502 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/X86/combine-srem.ll