[PATCH] D59897: [DAGCombiner] Teach TokenFactor pruning to peek through lifetime nodes
Nirav Dave via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 27 13:10:24 PDT 2019
niravd created this revision.
niravd added reviewers: courbet, jyknight.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
Lifetime nodes were inhibiting TokenFactor simplification inhibiting chain-based optimizations.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D59897
Files:
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/X86/swap.ll
Index: llvm/test/CodeGen/X86/swap.ll
===================================================================
--- llvm/test/CodeGen/X86/swap.ll
+++ llvm/test/CodeGen/X86/swap.ll
@@ -119,14 +119,11 @@
; NOAA-NEXT: vmovaps %xmm0, -{{[0-9]+}}(%rsp)
; NOAA-NEXT: vmovups (%rsi), %xmm0
; NOAA-NEXT: vmovaps %xmm0, -{{[0-9]+}}(%rsp)
-; NOAA-NEXT: vmovaps -{{[0-9]+}}(%rsp), %xmm0
; NOAA-NEXT: vmovups %xmm0, (%rdi)
; NOAA-NEXT: retq
;
; AA-LABEL: onealloc_readback_1:
; AA: # %bb.0: # %entry
-; AA-NEXT: vmovups (%rdi), %xmm0
-; AA-NEXT: vmovaps %xmm0, -{{[0-9]+}}(%rsp)
; AA-NEXT: vmovups (%rsi), %xmm0
; AA-NEXT: vmovaps %xmm0, -{{[0-9]+}}(%rsp)
; AA-NEXT: vmovups %xmm0, (%rdi)
@@ -152,14 +149,11 @@
; NOAA-NEXT: vmovaps %xmm0, -{{[0-9]+}}(%rsp)
; NOAA-NEXT: vmovups (%rsi), %xmm0
; NOAA-NEXT: vmovaps %xmm0, -{{[0-9]+}}(%rsp)
-; NOAA-NEXT: vmovaps -{{[0-9]+}}(%rsp), %xmm0
; NOAA-NEXT: vmovups %xmm0, (%rdi)
; NOAA-NEXT: retq
;
; AA-LABEL: onealloc_readback_2:
; AA: # %bb.0: # %entry
-; AA-NEXT: vmovups (%rdi), %xmm0
-; AA-NEXT: vmovaps %xmm0, -{{[0-9]+}}(%rsp)
; AA-NEXT: vmovups (%rsi), %xmm0
; AA-NEXT: vmovaps %xmm0, -{{[0-9]+}}(%rsp)
; AA-NEXT: vmovups %xmm0, (%rdi)
Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -1837,6 +1837,8 @@
for (const SDValue &Op : CurNode->op_values())
AddToWorklist(i, Op.getNode(), CurOpNumber);
break;
+ case ISD::LIFETIME_START:
+ case ISD::LIFETIME_END:
case ISD::CopyFromReg:
case ISD::CopyToReg:
AddToWorklist(i, CurNode->getOperand(0).getNode(), CurOpNumber);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59897.192503.patch
Type: text/x-patch
Size: 1818 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190327/70387225/attachment.bin>
More information about the llvm-commits
mailing list