[PATCH] D60801: [X86] Disable argument copy elision for arguments passed via pointers
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 20 08:25:08 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL358817: [X86] Disable argument copy elision for arguments passed via pointers (authored by ctopper, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D60801?vs=195911&id=195969#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60801/new/
https://reviews.llvm.org/D60801
Files:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
llvm/trunk/test/CodeGen/X86/arg-copy-elide-win64.ll
Index: llvm/trunk/test/CodeGen/X86/arg-copy-elide-win64.ll
===================================================================
--- llvm/trunk/test/CodeGen/X86/arg-copy-elide-win64.ll
+++ llvm/trunk/test/CodeGen/X86/arg-copy-elide-win64.ll
@@ -13,12 +13,12 @@
; CHECK-NEXT: vmovaps %xmm6, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
; CHECK-NEXT: andq $-128, %rsp
; CHECK-NEXT: movq 288(%rbp), %rax
-; CHECK-NEXT: movq 320(%rbp), %r10
; CHECK-NEXT: vmovaps (%rax), %ymm0
-; CHECK-NEXT: vmovaps (%r10), %ymm1
-; CHECK-NEXT: movq 352(%rbp), %rax
+; CHECK-NEXT: movq 296(%rbp), %rax
+; CHECK-NEXT: vmovaps (%rax), %ymm1
+; CHECK-NEXT: movq 304(%rbp), %rax
; CHECK-NEXT: vmovaps (%rax), %ymm2
-; CHECK-NEXT: movq 384(%rbp), %rax
+; CHECK-NEXT: movq 312(%rbp), %rax
; CHECK-NEXT: vmovaps (%rax), %ymm3
; CHECK-NEXT: vmovaps (%rcx), %ymm4
; CHECK-NEXT: vmovaps (%rdx), %ymm5
Index: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
===================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
@@ -3011,7 +3011,11 @@
}
// This is an argument in memory. We might be able to perform copy elision.
- if (Flags.isCopyElisionCandidate()) {
+ // If the argument is passed directly in memory without any extension, then we
+ // can perform copy elision. Large vector types, for example, may be passed
+ // indirectly by pointer.
+ if (Flags.isCopyElisionCandidate() &&
+ VA.getLocInfo() != CCValAssign::Indirect && !ExtendedInMem) {
EVT ArgVT = Ins[i].ArgVT;
SDValue PartAddr;
if (Ins[i].PartOffset == 0) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60801.195969.patch
Type: text/x-patch
Size: 1681 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190420/b03cb697/attachment-0001.bin>
More information about the llvm-commits
mailing list