[DAGCombine] Revert of recommit of "binop-with-const hoisting" patches
authorRoman Lebedev <lebedev.ri@gmail.com>
Thu, 30 May 2019 16:07:11 +0000 (16:07 +0000)
committerRoman Lebedev <lebedev.ri@gmail.com>
Thu, 30 May 2019 16:07:11 +0000 (16:07 +0000)
commit019d270e43967558de00ee4b6d624a2225a2fb77
tree945cdfd751c4c967f28261d5b3b871334ec439c1
parent0317e46a6322037cef6160dd7216dfe0499aaa4b
[DAGCombine] Revert of recommit of "binop-with-const hoisting" patches

I was looking into an endless combine loop the uncommitted follow-up patch
was causing, and it appears even these patches can exibit such an
endless loop. The root cause is that we try to hoist one binop (add/sub) with
constant operand, and if we get two such binops both of which are
eligible for this hoisting, we get stuck.

Some cases may highlight missing constant-folds.

Reverts r361871,r361872,r361873,r361874.

llvm-svn: 362109
15 files changed:
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/AArch64/shift-amount-mod.ll
llvm/test/CodeGen/AArch64/sink-addsub-of-const.ll
llvm/test/CodeGen/AArch64/vec_add.ll
llvm/test/CodeGen/AArch64/xor.ll
llvm/test/CodeGen/AMDGPU/llvm.amdgcn.s.barrier.ll
llvm/test/CodeGen/SPARC/2013-05-17-CallFrame.ll
llvm/test/CodeGen/SystemZ/alloca-03.ll
llvm/test/CodeGen/X86/combine-add.ll
llvm/test/CodeGen/X86/ragreedy-hoist-spill.ll
llvm/test/CodeGen/X86/shift-amount-mod.ll
llvm/test/CodeGen/X86/sink-addsub-of-const.ll
llvm/test/CodeGen/X86/vec_add.ll
llvm/test/CodeGen/X86/xor.ll
llvm/test/CodeGen/X86/zext-sext.ll