Skip to content

Commit 346a911

Browse files
committed
update tests
1 parent b5351c4 commit 346a911

File tree

5 files changed

+40
-32
lines changed

5 files changed

+40
-32
lines changed

llvm/test/CodeGen/X86/musttail-inalloca.ll

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,13 @@ define dso_local x86_thiscallcc void @methodWithVtorDisp_thunk(ptr %0, ptr inall
1818
; CHECK-LABEL: methodWithVtorDisp_thunk:
1919
; CHECK: # %bb.0:
2020
; CHECK-NEXT: pushl %esi
21-
; CHECK-NEXT: subl $20, %esp
2221
; CHECK-NEXT: movl %ecx, %esi
2322
; CHECK-NEXT: subl -4(%ecx), %esi
2423
; CHECK-NEXT: pushl {{[0-9]+}}(%esp)
2524
; CHECK-NEXT: pushl $_methodWithVtorDisp_thunk
2625
; CHECK-NEXT: calll ___cyg_profile_func_exit
2726
; CHECK-NEXT: addl $8, %esp
2827
; CHECK-NEXT: movl %esi, %ecx
29-
; CHECK-NEXT: addl $20, %esp
3028
; CHECK-NEXT: popl %esi
3129
; CHECK-NEXT: jmp _methodWithVtorDisp # TAILCALL
3230
%3 = getelementptr inbounds i8, ptr %0, i32 -4

llvm/test/CodeGen/X86/musttail-struct.ll

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ define dso_local i32 @test5(ptr byval(%struct.5xi32) %0) {
4242
define dso_local i32 @testManyArgs(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i8 %6, ptr byval(%struct.5xi32) %7) {
4343
; CHECK-LABEL: testManyArgs:
4444
; CHECK: # %bb.0:
45-
; CHECK-NEXT: movzx eax, byte ptr [rsp + 8]
46-
; CHECK-NEXT: mov byte ptr [rsp + 8], al
4745
; CHECK-NEXT: jmp FuncManyArgs # TAILCALL
4846
%r = musttail call i32 @FuncManyArgs(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i8 %6, ptr byval(%struct.5xi32) %7)
4947
ret i32 %r
@@ -52,8 +50,6 @@ define dso_local i32 @testManyArgs(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %
5250
define dso_local i32 @testRecursion(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i8 %6, ptr byval(%struct.5xi32) %7) {
5351
; CHECK-LABEL: testRecursion:
5452
; CHECK: # %bb.0:
55-
; CHECK-NEXT: movzx eax, byte ptr [rsp + 8]
56-
; CHECK-NEXT: mov byte ptr [rsp + 8], al
5753
; CHECK-NEXT: jmp testRecursion # TAILCALL
5854
%r = musttail call i32 @testRecursion(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i8 %6, ptr byval(%struct.5xi32) %7)
5955
ret i32 %r

llvm/test/CodeGen/X86/musttail-tailcc.ll

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ define dso_local tailcc void @void_test(i32, i32, i32, i32) {
5555
;
5656
; X86-LABEL: void_test:
5757
; X86: # %bb.0: # %entry
58+
; X86-NEXT: pushl %esi
59+
; X86-NEXT: .cfi_def_cfa_offset 8
60+
; X86-NEXT: .cfi_offset %esi, -8
61+
; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
62+
; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
63+
; X86-NEXT: movl %esi, {{[0-9]+}}(%esp)
64+
; X86-NEXT: movl %eax, {{[0-9]+}}(%esp)
65+
; X86-NEXT: popl %esi
66+
; X86-NEXT: .cfi_def_cfa_offset 4
5867
; X86-NEXT: jmp void_test # TAILCALL
5968
entry:
6069
musttail call tailcc void @void_test( i32 %0, i32 %1, i32 %2, i32 %3)
@@ -68,6 +77,15 @@ define dso_local tailcc i1 @i1test(i32, i32, i32, i32) {
6877
;
6978
; X86-LABEL: i1test:
7079
; X86: # %bb.0: # %entry
80+
; X86-NEXT: pushl %esi
81+
; X86-NEXT: .cfi_def_cfa_offset 8
82+
; X86-NEXT: .cfi_offset %esi, -8
83+
; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
84+
; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
85+
; X86-NEXT: movl %esi, {{[0-9]+}}(%esp)
86+
; X86-NEXT: movl %eax, {{[0-9]+}}(%esp)
87+
; X86-NEXT: popl %esi
88+
; X86-NEXT: .cfi_def_cfa_offset 4
7189
; X86-NEXT: jmp i1test # TAILCALL
7290
entry:
7391
%4 = musttail call tailcc i1 @i1test( i32 %0, i32 %1, i32 %2, i32 %3)

llvm/test/CodeGen/X86/musttail-varargs.ll

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -243,43 +243,37 @@ define void @f_thunk(ptr %this, ...) {
243243
; X86-NOSSE: # %bb.0:
244244
; X86-NOSSE-NEXT: pushl %ebp
245245
; X86-NOSSE-NEXT: movl %esp, %ebp
246-
; X86-NOSSE-NEXT: pushl %esi
247246
; X86-NOSSE-NEXT: andl $-16, %esp
248247
; X86-NOSSE-NEXT: subl $32, %esp
249-
; X86-NOSSE-NEXT: movl 8(%ebp), %esi
250-
; X86-NOSSE-NEXT: leal 12(%ebp), %eax
251-
; X86-NOSSE-NEXT: movl %eax, (%esp)
252-
; X86-NOSSE-NEXT: pushl %esi
248+
; X86-NOSSE-NEXT: movl 8(%ebp), %eax
249+
; X86-NOSSE-NEXT: leal 12(%ebp), %ecx
250+
; X86-NOSSE-NEXT: movl %ecx, (%esp)
251+
; X86-NOSSE-NEXT: pushl %eax
253252
; X86-NOSSE-NEXT: calll _get_f
254253
; X86-NOSSE-NEXT: addl $4, %esp
255-
; X86-NOSSE-NEXT: movl %esi, 8(%ebp)
256-
; X86-NOSSE-NEXT: leal -4(%ebp), %esp
257-
; X86-NOSSE-NEXT: popl %esi
254+
; X86-NOSSE-NEXT: movl %ebp, %esp
258255
; X86-NOSSE-NEXT: popl %ebp
259256
; X86-NOSSE-NEXT: jmpl *%eax # TAILCALL
260257
;
261258
; X86-SSE-LABEL: f_thunk:
262259
; X86-SSE: # %bb.0:
263260
; X86-SSE-NEXT: pushl %ebp
264261
; X86-SSE-NEXT: movl %esp, %ebp
265-
; X86-SSE-NEXT: pushl %esi
266262
; X86-SSE-NEXT: andl $-16, %esp
267263
; X86-SSE-NEXT: subl $80, %esp
268264
; X86-SSE-NEXT: movaps %xmm2, {{[-0-9]+}}(%e{{[sb]}}p) # 16-byte Spill
269265
; X86-SSE-NEXT: movaps %xmm1, {{[-0-9]+}}(%e{{[sb]}}p) # 16-byte Spill
270266
; X86-SSE-NEXT: movaps %xmm0, (%esp) # 16-byte Spill
271-
; X86-SSE-NEXT: movl 8(%ebp), %esi
272-
; X86-SSE-NEXT: leal 12(%ebp), %eax
273-
; X86-SSE-NEXT: movl %eax, {{[0-9]+}}(%esp)
274-
; X86-SSE-NEXT: pushl %esi
267+
; X86-SSE-NEXT: movl 8(%ebp), %eax
268+
; X86-SSE-NEXT: leal 12(%ebp), %ecx
269+
; X86-SSE-NEXT: movl %ecx, {{[0-9]+}}(%esp)
270+
; X86-SSE-NEXT: pushl %eax
275271
; X86-SSE-NEXT: calll _get_f
276272
; X86-SSE-NEXT: addl $4, %esp
277-
; X86-SSE-NEXT: movl %esi, 8(%ebp)
278273
; X86-SSE-NEXT: movaps (%esp), %xmm0 # 16-byte Reload
279274
; X86-SSE-NEXT: movaps {{[-0-9]+}}(%e{{[sb]}}p), %xmm1 # 16-byte Reload
280275
; X86-SSE-NEXT: movaps {{[-0-9]+}}(%e{{[sb]}}p), %xmm2 # 16-byte Reload
281-
; X86-SSE-NEXT: leal -4(%ebp), %esp
282-
; X86-SSE-NEXT: popl %esi
276+
; X86-SSE-NEXT: movl %ebp, %esp
283277
; X86-SSE-NEXT: popl %ebp
284278
; X86-SSE-NEXT: jmpl *%eax # TAILCALL
285279
%ap = alloca [4 x ptr], align 16
@@ -310,11 +304,14 @@ define void @g_thunk(ptr %fptr_i8, ...) {
310304
; WINDOWS: # %bb.0:
311305
; WINDOWS-NEXT: rex64 jmpq *%rcx # TAILCALL
312306
;
313-
; X86-LABEL: g_thunk:
314-
; X86: # %bb.0:
315-
; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
316-
; X86-NEXT: movl %eax, {{[0-9]+}}(%esp)
317-
; X86-NEXT: jmpl *%eax # TAILCALL
307+
; X86-NOSSE-LABEL: g_thunk:
308+
; X86-NOSSE: # %bb.0:
309+
; X86-NOSSE-NEXT: jmpl *{{[0-9]+}}(%esp) # TAILCALL
310+
;
311+
; X86-SSE-LABEL: g_thunk:
312+
; X86-SSE: # %bb.0:
313+
; X86-SSE-NEXT: movl {{[0-9]+}}(%esp), %eax
314+
; X86-SSE-NEXT: jmpl *%eax # TAILCALL
318315
musttail call void (ptr, ...) %fptr_i8(ptr %fptr_i8, ...)
319316
ret void
320317
}
@@ -374,10 +371,9 @@ define void @h_thunk(ptr %this, ...) {
374371
; X86-NEXT: movl %eax, {{[0-9]+}}(%esp)
375372
; X86-NEXT: jmpl *%ecx # TAILCALL
376373
; X86-NEXT: LBB2_2: # %else
377-
; X86-NEXT: movl 8(%eax), %ecx
374+
; X86-NEXT: movl 8(%eax), %eax
378375
; X86-NEXT: movl $42, _g
379-
; X86-NEXT: movl %eax, {{[0-9]+}}(%esp)
380-
; X86-NEXT: jmpl *%ecx # TAILCALL
376+
; X86-NEXT: jmpl *%eax # TAILCALL
381377
%cond = load i1, ptr %this
382378
br i1 %cond, label %then, label %else
383379

llvm/test/CodeGen/X86/musttail.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ define i32 @t4(ptr %fn, i32 %n, i32 %r) {
4646
; CHECK: decl %[[n:.*]]
4747
; CHECK-DAG: movl %[[r]], {{[0-9]+}}(%esp)
4848
; CHECK-DAG: movl %[[n]], {{[0-9]+}}(%esp)
49-
; CHECK: jmpl *%{{.*}}
49+
; CHECK: jmpl *{{.*}} # TAILCALL
5050

5151
entry:
5252
%r1 = add i32 %r, 1
@@ -74,7 +74,7 @@ define i32 @t5(ptr %fn, i32 %n, i32 %r) alignstack(32) {
7474
; CHECK: leal {{[-0-9]+}}(%ebp), %esp
7575
; CHECK: popl %esi
7676
; CHECK: popl %ebp
77-
; CHECK: jmpl *%{{.*}}
77+
; CHECK: jmpl *{{.*}} # TAILCALL
7878

7979
entry:
8080
%a = alloca i8, i32 %n

0 commit comments

Comments
 (0)