]> granicus.if.org Git - llvm/commit
[DAGCombine] ((A-c1)+c2) -> (A+(c2-c1)) constant-fold
authorRoman Lebedev <lebedev.ri@gmail.com>
Thu, 30 May 2019 19:27:19 +0000 (19:27 +0000)
committerRoman Lebedev <lebedev.ri@gmail.com>
Thu, 30 May 2019 19:27:19 +0000 (19:27 +0000)
commit0a21e6fba316b0fc279ff90bd9124a78389ede32
tree226e52c2a677ff9378f865ea9efd9cfde9385886
parent59dfcbec0858987be3f3a5ab348ead5f689d3d07
[DAGCombine] ((A-c1)+c2) -> (A+(c2-c1))  constant-fold

Summary:
This was the root cause of the endless combine loop in D62257

https://rise4fun.com/Alive/d3W

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

Reviewed By: t.p.northover

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

Tags: #llvm

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

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