]> granicus.if.org Git - llvm/commit
[X86][CodeGen][NFC] Delay `combineIncDecVector()` from DAGCombine to X86DAGToDAGISel
authorRoman Lebedev <lebedev.ri@gmail.com>
Thu, 29 Aug 2019 10:50:09 +0000 (10:50 +0000)
committerRoman Lebedev <lebedev.ri@gmail.com>
Thu, 29 Aug 2019 10:50:09 +0000 (10:50 +0000)
commit161b88e517089db1134ce3e9fe9e4a25bc1f204d
tree92984346f7a26b81ff94db78ffae807375ad2a79
parentae86cd45ead0cd14f042e4bf553b9e561953bad0
[X86][CodeGen][NFC] Delay `combineIncDecVector()` from DAGCombine to X86DAGToDAGISel

Summary:
We were previously doing it in DAGCombine.
But we also want to do `sub %x, C` -> `add %x, (sub 0, C)` for vectors in DAGCombine.
So if we had `sub %x, -1`, we'll transform it to `add %x, 1`,
which `combineIncDecVector()` will immediately transform back into `sub %x, -1`,
and here we go again...

I've marked this as NFC since not a single test changes,
but since that 'changes' DAGCombine, probably this isn't fully NFC.

Reviewers: RKSimon, craig.topper, spatel

Reviewed By: craig.topper

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370327 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelDAGToDAG.cpp
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86ISelLowering.h
test/CodeGen/X86/stack-folding-int-avx1.ll
test/CodeGen/X86/stack-folding-int-sse42.ll