[llvm] 8293645 - Autogenerate tests for win64-byval.ll . NFC
Amaury Séchet via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 23 14:58:15 PDT 2022
Author: Amaury Séchet
Date: 2022-07-23T21:58:06Z
New Revision: 8293645e1b68a156a379cf9a4c9086eed6e2edc9
URL: https://github.com/llvm/llvm-project/commit/8293645e1b68a156a379cf9a4c9086eed6e2edc9
DIFF: https://github.com/llvm/llvm-project/commit/8293645e1b68a156a379cf9a4c9086eed6e2edc9.diff
LOG: Autogenerate tests for win64-byval.ll . NFC
Added:
Modified:
llvm/test/CodeGen/X86/win64-byval.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/X86/win64-byval.ll b/llvm/test/CodeGen/X86/win64-byval.ll
index cd48680da122..bb6be149cccc 100644
--- a/llvm/test/CodeGen/X86/win64-byval.ll
+++ b/llvm/test/CodeGen/X86/win64-byval.ll
@@ -1,34 +1,51 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple x86_64-w64-mingw32 %s -o - | FileCheck %s
declare void @foo(ptr byval({ float, double }))
@G = external constant { float, double }
-define void @bar()
-{
+define void @bar() {
; Make sure we're creating a temporary stack slot, rather than just passing
; the pointer through unmodified.
-; CHECK-LABEL: @bar
-; CHECK: movq .refptr.G(%rip), %rax
-; CHECK: movq (%rax), %rcx
-; CHECK: movq 8(%rax), %rax
-; CHECK: movq %rax, 40(%rsp)
-; CHECK: movq %rcx, 32(%rsp)
-; CHECK: leaq 32(%rsp), %rcx
+; CHECK-LABEL: bar:
+; CHECK: # %bb.0:
+; CHECK-NEXT: subq $56, %rsp
+; CHECK-NEXT: .seh_stackalloc 56
+; CHECK-NEXT: .seh_endprologue
+; CHECK-NEXT: movq .refptr.G(%rip), %rax
+; CHECK-NEXT: movq (%rax), %rcx
+; CHECK-NEXT: movq 8(%rax), %rax
+; CHECK-NEXT: movq %rax, {{[0-9]+}}(%rsp)
+; CHECK-NEXT: movq %rcx, {{[0-9]+}}(%rsp)
+; CHECK-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; CHECK-NEXT: callq foo
+; CHECK-NEXT: nop
+; CHECK-NEXT: addq $56, %rsp
+; CHECK-NEXT: retq
+; CHECK-NEXT: .seh_endproc
call void @foo(ptr byval({ float, double }) @G)
ret void
}
-define void @baz(ptr byval({ float, double }) %arg)
-{
+define void @baz(ptr byval({ float, double }) %arg) {
; On Win64 the byval is effectively ignored on declarations, since we do
; pass a real pointer in registers. However, by our semantics if we pass
; the pointer on to another byval function, we do need to make a copy.
-; CHECK-LABEL: @baz
-; CHECK: movq (%rcx), %rax
-; CHECK: movq 8(%rcx), %rcx
-; CHECK: movq %rcx, 40(%rsp)
-; CHECK: movq %rax, 32(%rsp)
-; CHECK: leaq 32(%rsp), %rcx
+; CHECK-LABEL: baz:
+; CHECK: # %bb.0:
+; CHECK-NEXT: subq $56, %rsp
+; CHECK-NEXT: .seh_stackalloc 56
+; CHECK-NEXT: .seh_endprologue
+; CHECK-NEXT: movq (%rcx), %rax
+; CHECK-NEXT: movq 8(%rcx), %rcx
+; CHECK-NEXT: movq %rcx, {{[0-9]+}}(%rsp)
+; CHECK-NEXT: movq %rax, {{[0-9]+}}(%rsp)
+; CHECK-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; CHECK-NEXT: callq foo
+; CHECK-NEXT: nop
+; CHECK-NEXT: addq $56, %rsp
+; CHECK-NEXT: retq
+; CHECK-NEXT: .seh_endproc
call void @foo(ptr byval({ float, double }) %arg)
ret void
}
@@ -37,26 +54,36 @@ declare void @foo2(ptr byval({ float, double }), ptr byval({ float, double }), p
@data = external constant { float, double }
define void @test() {
-; CHECK-LABEL: @test
-; CHECK: movq (%rax), %rcx
-; CHECK-NEXT: movq 8(%rax), %rax
-; CHECK-NEXT: movq %rax, 120(%rsp)
-; CHECK-NEXT: movq %rcx, 112(%rsp)
-; CHECK-NEXT: movq %rcx, 96(%rsp)
-; CHECK-NEXT: movq %rax, 104(%rsp)
-; CHECK-NEXT: movq %rcx, 80(%rsp)
-; CHECK-NEXT: movq %rax, 88(%rsp)
-; CHECK-NEXT: movq %rcx, 64(%rsp)
-; CHECK-NEXT: movq %rax, 72(%rsp)
-; CHECK-NEXT: movq %rax, 56(%rsp)
-; CHECK-NEXT: movq %rcx, 48(%rsp)
-; CHECK-NEXT: leaq 48(%rsp), %rax
-; CHECK-NEXT: movq %rax, 32(%rsp)
-; CHECK-NEXT: movq $10, 40(%rsp)
-; CHECK-NEXT: leaq 112(%rsp), %rcx
-; CHECK-NEXT: leaq 96(%rsp), %rdx
-; CHECK-NEXT: leaq 80(%rsp), %r8
-; CHECK-NEXT: leaq 64(%rsp), %r9
+; CHECK-LABEL: test:
+; CHECK: # %bb.0:
+; CHECK-NEXT: subq $136, %rsp
+; CHECK-NEXT: .seh_stackalloc 136
+; CHECK-NEXT: .seh_endprologue
+; CHECK-NEXT: movq .refptr.G(%rip), %rax
+; CHECK-NEXT: movq (%rax), %rcx
+; CHECK-NEXT: movq 8(%rax), %rax
+; CHECK-NEXT: movq %rax, {{[0-9]+}}(%rsp)
+; CHECK-NEXT: movq %rcx, {{[0-9]+}}(%rsp)
+; CHECK-NEXT: movq %rcx, {{[0-9]+}}(%rsp)
+; CHECK-NEXT: movq %rax, {{[0-9]+}}(%rsp)
+; CHECK-NEXT: movq %rcx, {{[0-9]+}}(%rsp)
+; CHECK-NEXT: movq %rax, {{[0-9]+}}(%rsp)
+; CHECK-NEXT: movq %rcx, {{[0-9]+}}(%rsp)
+; CHECK-NEXT: movq %rax, {{[0-9]+}}(%rsp)
+; CHECK-NEXT: movq %rax, {{[0-9]+}}(%rsp)
+; CHECK-NEXT: movq %rcx, {{[0-9]+}}(%rsp)
+; CHECK-NEXT: leaq {{[0-9]+}}(%rsp), %rax
+; CHECK-NEXT: movq %rax, {{[0-9]+}}(%rsp)
+; CHECK-NEXT: movq $10, {{[0-9]+}}(%rsp)
+; CHECK-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; CHECK-NEXT: leaq {{[0-9]+}}(%rsp), %rdx
+; CHECK-NEXT: leaq {{[0-9]+}}(%rsp), %r8
+; CHECK-NEXT: leaq {{[0-9]+}}(%rsp), %r9
+; CHECK-NEXT: callq foo2
+; CHECK-NEXT: nop
+; CHECK-NEXT: addq $136, %rsp
+; CHECK-NEXT: retq
+; CHECK-NEXT: .seh_endproc
call void @foo2(ptr byval({ float, double }) @G, ptr byval({ float, double }) @G, ptr byval({ float, double }) @G, ptr byval({ float, double }) @G, ptr byval({ float, double }) @G, i64 10)
ret void
}
More information about the llvm-commits
mailing list