]> granicus.if.org Git - llvm/commit
[DAGCombine] (A+C1)-C2 -> A+(C1-C2) constant-fold
authorRoman Lebedev <lebedev.ri@gmail.com>
Thu, 30 May 2019 19:27:32 +0000 (19:27 +0000)
committerRoman Lebedev <lebedev.ri@gmail.com>
Thu, 30 May 2019 19:27:32 +0000 (19:27 +0000)
commit42f63886b907ead1b403cb725891d18e27667728
treea5bc5e25407e0d3c4dec1a83c35534a809b79e64
parent69aa60333249d4cdbf05744982ca05d8d8d31243
[DAGCombine] (A+C1)-C2 -> A+(C1-C2) constant-fold

Summary:
Direct sibling of D62662, the root cause of the endless combine loop in D62257

https://rise4fun.com/Alive/d3W

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/D62664

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362133 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/AArch64/addsub-constant-folding.ll
test/CodeGen/X86/addsub-constant-folding.ll