[DAGCombine] (A-C1)-C2 -> A-(C1+C2) constant-fold
authorRoman Lebedev <lebedev.ri@gmail.com>
Thu, 30 May 2019 19:27:42 +0000 (19:27 +0000)
committerRoman Lebedev <lebedev.ri@gmail.com>
Thu, 30 May 2019 19:27:42 +0000 (19:27 +0000)
commit691b5e2eccc5c21f020793c39c3e011348df19f7
tree770a9f950f5f5280df09f702ab85029a332bf068
parent0a3dbbcdfb5482987125fdb8267820351d13a545
[DAGCombine] (A-C1)-C2 -> A-(C1+C2) constant-fold

Summary: https://rise4fun.com/Alive/Mb1M

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

Reviewed By: t.p.northover

Subscribers: t.p.northover, javed.absar, llvm-commits

Tags: #llvm

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

llvm-svn: 362134
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/AArch64/addsub-constant-folding.ll
llvm/test/CodeGen/X86/addsub-constant-folding.ll