]> granicus.if.org Git - llvm/commit
[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)
commited880bf1d6401b1c52175c827722327b7b228752
tree27cd8ceb8b3e52aa404b6d076079ba1c0b909f03
parent21c581accc809f6bf0af133cd49e0dbd948f5021
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362109 91177308-0d34-0410-b5e6-96231b3b80d8
15 files changed:
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/AArch64/shift-amount-mod.ll
test/CodeGen/AArch64/sink-addsub-of-const.ll
test/CodeGen/AArch64/vec_add.ll
test/CodeGen/AArch64/xor.ll
test/CodeGen/AMDGPU/llvm.amdgcn.s.barrier.ll
test/CodeGen/SPARC/2013-05-17-CallFrame.ll
test/CodeGen/SystemZ/alloca-03.ll
test/CodeGen/X86/combine-add.ll
test/CodeGen/X86/ragreedy-hoist-spill.ll
test/CodeGen/X86/shift-amount-mod.ll
test/CodeGen/X86/sink-addsub-of-const.ll
test/CodeGen/X86/vec_add.ll
test/CodeGen/X86/xor.ll
test/CodeGen/X86/zext-sext.ll