[DAGCombine] (x - C) - y -> (x - y) - C fold. Try 3
authorRoman Lebedev <lebedev.ri@gmail.com>
Thu, 30 May 2019 20:37:39 +0000 (20:37 +0000)
committerRoman Lebedev <lebedev.ri@gmail.com>
Thu, 30 May 2019 20:37:39 +0000 (20:37 +0000)
commit57aa36ff9164f40cf99f38428246c59d41a74ddd
treef9ef47b41004ecbdf8ae76bbf985e81797446cce
parent63b4741534a9c1520aa618b1bc69b00771a7aa1b
[DAGCombine] (x - C) - y  ->  (x - y) - C  fold. Try 3

Summary:
Again only vectors affected. Frustrating. Let me take a look into that..

https://rise4fun.com/Alive/AAq

This is a recommit, originally committed in rL361852, but reverted
to investigate test-suite compile-time hangs, and then reverted in
rL362109 to fix missing constant folds that were causing
endless combine loops.

Reviewers: RKSimon, craig.topper, spatel

Reviewed By: RKSimon

Subscribers: javed.absar, JDevlieghere, llvm-commits

Tags: #llvm

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

llvm-svn: 362145
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/AArch64/sink-addsub-of-const.ll
llvm/test/CodeGen/X86/sink-addsub-of-const.ll