[DAGCombine] Use FoldConstantArithmetic() to perform ((c1-A)+c2) -> (c1+c2)-A fold
authorRoman Lebedev <lebedev.ri@gmail.com>
Thu, 30 May 2019 19:27:10 +0000 (19:27 +0000)
committerRoman Lebedev <lebedev.ri@gmail.com>
Thu, 30 May 2019 19:27:10 +0000 (19:27 +0000)
commitef95679741e01235c32547e5ae7f8259f703847a
tree1c553f72c1ca4ed1c522bd53ab61af662e08315d
parentfcb00d4aec7de1f51292b65d660001f70b95f7b3
[DAGCombine] Use FoldConstantArithmetic() to perform ((c1-A)+c2) -> (c1+c2)-A fold

Summary: No tests change, and i'm not sure how to test this, but it's better safe than sorry.

Reviewers: spatel, RKSimon, craig.topper, t.p.northover

Reviewed By: craig.topper

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62661

llvm-svn: 362130
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp