[NFC][X86] Fix `sibcall.ll` formatting

Summary:
Remove unnecessary lines from `sibcall.ll` and rename labels according
to @RKSimon's recommendations in the D45653 conversation.

llvm-svn: 340735
This commit is contained in:
Aleksandr Urakov 2018-08-27 11:25:38 +00:00
parent f2588a28a8
commit 6f7fef7865
1 changed files with 303 additions and 317 deletions

View File

@ -1,20 +1,20 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=i686-linux -mcpu=core2 -mattr=+sse2 | FileCheck %s --check-prefix=X32
; RUN: llc < %s -mtriple=i686-linux -mcpu=core2 -mattr=+sse2 | FileCheck %s --check-prefix=X86
; RUN: llc < %s -mtriple=x86_64-linux -mcpu=core2 -mattr=+sse2 | FileCheck %s --check-prefix=X64
; RUN: llc < %s -mtriple=x86_64-linux-gnux32 -mcpu=core2 -mattr=+sse2 | FileCheck %s --check-prefix=X32ABI
; RUN: llc < %s -mtriple=x86_64-linux-gnux32 -mcpu=core2 -mattr=+sse2 | FileCheck %s --check-prefix=X32
define void @t1(i32 %x) nounwind ssp {
; X32-LABEL: t1:
; X32: # %bb.0:
; X32-NEXT: jmp foo # TAILCALL
; X86-LABEL: t1:
; X86: # %bb.0:
; X86-NEXT: jmp foo # TAILCALL
;
; X64-LABEL: t1:
; X64: # %bb.0:
; X64-NEXT: jmp foo # TAILCALL
;
; X32ABI-LABEL: t1:
; X32ABI: # %bb.0:
; X32ABI-NEXT: jmp foo # TAILCALL
; X32-LABEL: t1:
; X32: # %bb.0:
; X32-NEXT: jmp foo # TAILCALL
tail call void @foo() nounwind
ret void
}
@ -22,17 +22,17 @@ define void @t1(i32 %x) nounwind ssp {
declare void @foo()
define void @t2() nounwind ssp {
; X32-LABEL: t2:
; X32: # %bb.0:
; X32-NEXT: jmp foo2 # TAILCALL
; X86-LABEL: t2:
; X86: # %bb.0:
; X86-NEXT: jmp foo2 # TAILCALL
;
; X64-LABEL: t2:
; X64: # %bb.0:
; X64-NEXT: jmp foo2 # TAILCALL
;
; X32ABI-LABEL: t2:
; X32ABI: # %bb.0:
; X32ABI-NEXT: jmp foo2 # TAILCALL
; X32-LABEL: t2:
; X32: # %bb.0:
; X32-NEXT: jmp foo2 # TAILCALL
%t0 = tail call i32 @foo2() nounwind
ret void
}
@ -40,17 +40,17 @@ define void @t2() nounwind ssp {
declare i32 @foo2()
define void @t3() nounwind ssp {
; X32-LABEL: t3:
; X32: # %bb.0:
; X32-NEXT: jmp foo3 # TAILCALL
; X86-LABEL: t3:
; X86: # %bb.0:
; X86-NEXT: jmp foo3 # TAILCALL
;
; X64-LABEL: t3:
; X64: # %bb.0:
; X64-NEXT: jmp foo3 # TAILCALL
;
; X32ABI-LABEL: t3:
; X32ABI: # %bb.0:
; X32ABI-NEXT: jmp foo3 # TAILCALL
; X32-LABEL: t3:
; X32: # %bb.0:
; X32-NEXT: jmp foo3 # TAILCALL
%t0 = tail call i32 @foo3() nounwind
ret void
}
@ -58,13 +58,13 @@ define void @t3() nounwind ssp {
declare i32 @foo3()
define void @t4(void (i32)* nocapture %x) nounwind ssp {
; X32-LABEL: t4:
; X32: # %bb.0:
; X32-NEXT: subl $12, %esp
; X32-NEXT: movl $0, (%esp)
; X32-NEXT: calll *{{[0-9]+}}(%esp)
; X32-NEXT: addl $12, %esp
; X32-NEXT: retl
; X86-LABEL: t4:
; X86: # %bb.0:
; X86-NEXT: subl $12, %esp
; X86-NEXT: movl $0, (%esp)
; X86-NEXT: calll *{{[0-9]+}}(%esp)
; X86-NEXT: addl $12, %esp
; X86-NEXT: retl
;
; X64-LABEL: t4:
; X64: # %bb.0:
@ -72,11 +72,11 @@ define void @t4(void (i32)* nocapture %x) nounwind ssp {
; X64-NEXT: xorl %edi, %edi
; X64-NEXT: jmpq *%rax # TAILCALL
;
; X32ABI-LABEL: t4:
; X32ABI: # %bb.0:
; X32ABI-NEXT: movl %edi, %eax
; X32ABI-NEXT: xorl %edi, %edi
; X32ABI-NEXT: jmpq *%rax # TAILCALL
; X32-LABEL: t4:
; X32: # %bb.0:
; X32-NEXT: movl %edi, %eax
; X32-NEXT: xorl %edi, %edi
; X32-NEXT: jmpq *%rax # TAILCALL
tail call void %x(i32 0) nounwind
ret void
}
@ -85,38 +85,38 @@ define void @t4(void (i32)* nocapture %x) nounwind ssp {
; zero-extend pointers passed in registers.
define void @t5(void ()* nocapture %x) nounwind ssp {
; X32-LABEL: t5:
; X32: # %bb.0:
; X32-NEXT: jmpl *{{[0-9]+}}(%esp) # TAILCALL
; X86-LABEL: t5:
; X86: # %bb.0:
; X86-NEXT: jmpl *{{[0-9]+}}(%esp) # TAILCALL
;
; X64-LABEL: t5:
; X64: # %bb.0:
; X64-NEXT: jmpq *%rdi # TAILCALL
;
; X32ABI-LABEL: t5:
; X32ABI: # %bb.0:
; X32ABI-NEXT: movl %edi, %eax
; X32ABI-NEXT: jmpq *%rax # TAILCALL
; X32-LABEL: t5:
; X32: # %bb.0:
; X32-NEXT: movl %edi, %eax
; X32-NEXT: jmpq *%rax # TAILCALL
tail call void %x() nounwind
ret void
}
define i32 @t6(i32 %x) nounwind ssp {
; X32-LABEL: t6:
; X32: # %bb.0:
; X32-NEXT: subl $12, %esp
; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
; X32-NEXT: cmpl $9, %eax
; X32-NEXT: jg .LBB5_2
; X32-NEXT: # %bb.1: # %bb
; X32-NEXT: decl %eax
; X32-NEXT: movl %eax, (%esp)
; X32-NEXT: calll t6
; X32-NEXT: addl $12, %esp
; X32-NEXT: retl
; X32-NEXT: .LBB5_2: # %bb1
; X32-NEXT: addl $12, %esp
; X32-NEXT: jmp bar # TAILCALL
; X86-LABEL: t6:
; X86: # %bb.0:
; X86-NEXT: subl $12, %esp
; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
; X86-NEXT: cmpl $9, %eax
; X86-NEXT: jg .LBB5_2
; X86-NEXT: # %bb.1: # %bb
; X86-NEXT: decl %eax
; X86-NEXT: movl %eax, (%esp)
; X86-NEXT: calll t6
; X86-NEXT: addl $12, %esp
; X86-NEXT: retl
; X86-NEXT: .LBB5_2: # %bb1
; X86-NEXT: addl $12, %esp
; X86-NEXT: jmp bar # TAILCALL
;
; X64-LABEL: t6:
; X64: # %bb.0:
@ -128,15 +128,15 @@ define i32 @t6(i32 %x) nounwind ssp {
; X64-NEXT: .LBB5_2: # %bb1
; X64-NEXT: jmp bar # TAILCALL
;
; X32ABI-LABEL: t6:
; X32ABI: # %bb.0:
; X32ABI-NEXT: cmpl $9, %edi
; X32ABI-NEXT: jg .LBB5_2
; X32ABI-NEXT: # %bb.1: # %bb
; X32ABI-NEXT: decl %edi
; X32ABI-NEXT: jmp t6 # TAILCALL
; X32ABI-NEXT: .LBB5_2: # %bb1
; X32ABI-NEXT: jmp bar # TAILCALL
; X32-LABEL: t6:
; X32: # %bb.0:
; X32-NEXT: cmpl $9, %edi
; X32-NEXT: jg .LBB5_2
; X32-NEXT: # %bb.1: # %bb
; X32-NEXT: decl %edi
; X32-NEXT: jmp t6 # TAILCALL
; X32-NEXT: .LBB5_2: # %bb1
; X32-NEXT: jmp bar # TAILCALL
%t0 = icmp slt i32 %x, 10
br i1 %t0, label %bb, label %bb1
@ -153,17 +153,17 @@ bb1:
declare i32 @bar(i32)
define i32 @t7(i32 %a, i32 %b, i32 %c) nounwind ssp {
; X32-LABEL: t7:
; X32: # %bb.0:
; X32-NEXT: jmp bar2 # TAILCALL
; X86-LABEL: t7:
; X86: # %bb.0:
; X86-NEXT: jmp bar2 # TAILCALL
;
; X64-LABEL: t7:
; X64: # %bb.0:
; X64-NEXT: jmp bar2 # TAILCALL
;
; X32ABI-LABEL: t7:
; X32ABI: # %bb.0:
; X32ABI-NEXT: jmp bar2 # TAILCALL
; X32-LABEL: t7:
; X32: # %bb.0:
; X32-NEXT: jmp bar2 # TAILCALL
%t0 = tail call i32 @bar2(i32 %a, i32 %b, i32 %c) nounwind
ret i32 %t0
}
@ -171,17 +171,17 @@ define i32 @t7(i32 %a, i32 %b, i32 %c) nounwind ssp {
declare i32 @bar2(i32, i32, i32)
define signext i16 @t8() nounwind ssp {
; X32-LABEL: t8:
; X32: # %bb.0: # %entry
; X32-NEXT: jmp bar3 # TAILCALL
; X86-LABEL: t8:
; X86: # %bb.0: # %entry
; X86-NEXT: jmp bar3 # TAILCALL
;
; X64-LABEL: t8:
; X64: # %bb.0: # %entry
; X64-NEXT: jmp bar3 # TAILCALL
;
; X32ABI-LABEL: t8:
; X32ABI: # %bb.0: # %entry
; X32ABI-NEXT: jmp bar3 # TAILCALL
; X32-LABEL: t8:
; X32: # %bb.0: # %entry
; X32-NEXT: jmp bar3 # TAILCALL
entry:
%0 = tail call signext i16 @bar3() nounwind ; <i16> [#uses=1]
ret i16 %0
@ -190,13 +190,13 @@ entry:
declare signext i16 @bar3()
define signext i16 @t9(i32 (i32)* nocapture %x) nounwind ssp {
; X32-LABEL: t9:
; X32: # %bb.0: # %entry
; X32-NEXT: subl $12, %esp
; X32-NEXT: movl $0, (%esp)
; X32-NEXT: calll *{{[0-9]+}}(%esp)
; X32-NEXT: addl $12, %esp
; X32-NEXT: retl
; X86-LABEL: t9:
; X86: # %bb.0: # %entry
; X86-NEXT: subl $12, %esp
; X86-NEXT: movl $0, (%esp)
; X86-NEXT: calll *{{[0-9]+}}(%esp)
; X86-NEXT: addl $12, %esp
; X86-NEXT: retl
;
; X64-LABEL: t9:
; X64: # %bb.0: # %entry
@ -204,11 +204,11 @@ define signext i16 @t9(i32 (i32)* nocapture %x) nounwind ssp {
; X64-NEXT: xorl %edi, %edi
; X64-NEXT: jmpq *%rax # TAILCALL
;
; X32ABI-LABEL: t9:
; X32ABI: # %bb.0: # %entry
; X32ABI-NEXT: movl %edi, %eax
; X32ABI-NEXT: xorl %edi, %edi
; X32ABI-NEXT: jmpq *%rax # TAILCALL
; X32-LABEL: t9:
; X32: # %bb.0: # %entry
; X32-NEXT: movl %edi, %eax
; X32-NEXT: xorl %edi, %edi
; X32-NEXT: jmpq *%rax # TAILCALL
entry:
%0 = bitcast i32 (i32)* %x to i16 (i32)*
%1 = tail call signext i16 %0(i32 0) nounwind
@ -216,20 +216,20 @@ entry:
}
define void @t10() nounwind ssp {
; X32-LABEL: t10:
; X32: # %bb.0: # %entry
; X32-NEXT: subl $12, %esp
; X32-NEXT: calll foo4
; X86-LABEL: t10:
; X86: # %bb.0: # %entry
; X86-NEXT: subl $12, %esp
; X86-NEXT: calll foo4
;
; X64-LABEL: t10:
; X64: # %bb.0: # %entry
; X64-NEXT: pushq %rax
; X64-NEXT: callq foo4
;
; X32ABI-LABEL: t10:
; X32ABI: # %bb.0: # %entry
; X32ABI-NEXT: pushq %rax
; X32ABI-NEXT: callq foo4
; X32-LABEL: t10:
; X32: # %bb.0: # %entry
; X32-NEXT: pushq %rax
; X32-NEXT: callq foo4
entry:
%0 = tail call i32 @foo4() noreturn nounwind
unreachable
@ -241,16 +241,16 @@ declare i32 @foo4()
; eliminated currently.
define i32 @t11(i32 %x, i32 %y, i32 %z.0, i32 %z.1, i32 %z.2) nounwind ssp {
; X32-LABEL: t11:
; X32: # %bb.0: # %entry
; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
; X32-NEXT: testl %eax, %eax
; X32-NEXT: je .LBB10_1
; X32-NEXT: # %bb.2: # %bb
; X32-NEXT: jmp foo5 # TAILCALL
; X32-NEXT: .LBB10_1: # %bb6
; X32-NEXT: xorl %eax, %eax
; X32-NEXT: retl
; X86-LABEL: t11:
; X86: # %bb.0: # %entry
; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
; X86-NEXT: testl %eax, %eax
; X86-NEXT: je .LBB10_1
; X86-NEXT: # %bb.2: # %bb
; X86-NEXT: jmp foo5 # TAILCALL
; X86-NEXT: .LBB10_1: # %bb6
; X86-NEXT: xorl %eax, %eax
; X86-NEXT: retl
;
; X64-LABEL: t11:
; X64: # %bb.0: # %entry
@ -262,15 +262,15 @@ define i32 @t11(i32 %x, i32 %y, i32 %z.0, i32 %z.1, i32 %z.2) nounwind ssp {
; X64-NEXT: xorl %eax, %eax
; X64-NEXT: retq
;
; X32ABI-LABEL: t11:
; X32ABI: # %bb.0: # %entry
; X32ABI-NEXT: testl %edi, %edi
; X32ABI-NEXT: je .LBB10_1
; X32ABI-NEXT: # %bb.2: # %bb
; X32ABI-NEXT: jmp foo5 # TAILCALL
; X32ABI-NEXT: .LBB10_1: # %bb6
; X32ABI-NEXT: xorl %eax, %eax
; X32ABI-NEXT: retq
; X32-LABEL: t11:
; X32: # %bb.0: # %entry
; X32-NEXT: testl %edi, %edi
; X32-NEXT: je .LBB10_1
; X32-NEXT: # %bb.2: # %bb
; X32-NEXT: jmp foo5 # TAILCALL
; X32-NEXT: .LBB10_1: # %bb6
; X32-NEXT: xorl %eax, %eax
; X32-NEXT: retq
entry:
%0 = icmp eq i32 %x, 0
br i1 %0, label %bb6, label %bb
@ -288,16 +288,16 @@ declare i32 @foo5(i32, i32, i32, i32, i32)
%struct.t = type { i32, i32, i32, i32, i32 }
define i32 @t12(i32 %x, i32 %y, %struct.t* byval align 4 %z) nounwind ssp {
; X32-LABEL: t12:
; X32: # %bb.0: # %entry
; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
; X32-NEXT: testl %eax, %eax
; X32-NEXT: je .LBB11_1
; X32-NEXT: # %bb.2: # %bb
; X32-NEXT: jmp foo6 # TAILCALL
; X32-NEXT: .LBB11_1: # %bb2
; X32-NEXT: xorl %eax, %eax
; X32-NEXT: retl
; X86-LABEL: t12:
; X86: # %bb.0: # %entry
; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
; X86-NEXT: testl %eax, %eax
; X86-NEXT: je .LBB11_1
; X86-NEXT: # %bb.2: # %bb
; X86-NEXT: jmp foo6 # TAILCALL
; X86-NEXT: .LBB11_1: # %bb2
; X86-NEXT: xorl %eax, %eax
; X86-NEXT: retl
;
; X64-LABEL: t12:
; X64: # %bb.0: # %entry
@ -309,15 +309,15 @@ define i32 @t12(i32 %x, i32 %y, %struct.t* byval align 4 %z) nounwind ssp {
; X64-NEXT: xorl %eax, %eax
; X64-NEXT: retq
;
; X32ABI-LABEL: t12:
; X32ABI: # %bb.0: # %entry
; X32ABI-NEXT: testl %edi, %edi
; X32ABI-NEXT: je .LBB11_1
; X32ABI-NEXT: # %bb.2: # %bb
; X32ABI-NEXT: jmp foo6 # TAILCALL
; X32ABI-NEXT: .LBB11_1: # %bb2
; X32ABI-NEXT: xorl %eax, %eax
; X32ABI-NEXT: retq
; X32-LABEL: t12:
; X32: # %bb.0: # %entry
; X32-NEXT: testl %edi, %edi
; X32-NEXT: je .LBB11_1
; X32-NEXT: # %bb.2: # %bb
; X32-NEXT: jmp foo6 # TAILCALL
; X32-NEXT: .LBB11_1: # %bb2
; X32-NEXT: xorl %eax, %eax
; X32-NEXT: retq
entry:
%0 = icmp eq i32 %x, 0
br i1 %0, label %bb2, label %bb
@ -337,20 +337,20 @@ declare i32 @foo6(i32, i32, %struct.t* byval align 4)
%struct.cp = type { float, float, float, float, float }
define %struct.ns* @t13(%struct.cp* %yy) nounwind ssp {
; X32-LABEL: t13:
; X32: # %bb.0: # %entry
; X32-NEXT: subl $28, %esp
; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
; X32-NEXT: movl 16(%eax), %ecx
; X32-NEXT: movl %ecx, {{[0-9]+}}(%esp)
; X32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
; X32-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
; X32-NEXT: movsd %xmm1, {{[0-9]+}}(%esp)
; X32-NEXT: movsd %xmm0, (%esp)
; X32-NEXT: xorl %ecx, %ecx
; X32-NEXT: calll foo7
; X32-NEXT: addl $28, %esp
; X32-NEXT: retl
; X86-LABEL: t13:
; X86: # %bb.0: # %entry
; X86-NEXT: subl $28, %esp
; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
; X86-NEXT: movl 16(%eax), %ecx
; X86-NEXT: movl %ecx, {{[0-9]+}}(%esp)
; X86-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
; X86-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
; X86-NEXT: movsd %xmm1, {{[0-9]+}}(%esp)
; X86-NEXT: movsd %xmm0, (%esp)
; X86-NEXT: xorl %ecx, %ecx
; X86-NEXT: calll foo7
; X86-NEXT: addl $28, %esp
; X86-NEXT: retl
;
; X64-LABEL: t13:
; X64: # %bb.0: # %entry
@ -368,21 +368,21 @@ define %struct.ns* @t13(%struct.cp* %yy) nounwind ssp {
; X64-NEXT: popq %rcx
; X64-NEXT: retq
;
; X32ABI-LABEL: t13:
; X32ABI: # %bb.0: # %entry
; X32ABI-NEXT: pushq %rax
; X32ABI-NEXT: subl $8, %esp
; X32ABI-NEXT: movl 16(%edi), %eax
; X32ABI-NEXT: movq (%edi), %rcx
; X32ABI-NEXT: movq 8(%edi), %rdx
; X32ABI-NEXT: xorl %edi, %edi
; X32ABI-NEXT: pushq %rax
; X32ABI-NEXT: pushq %rdx
; X32ABI-NEXT: pushq %rcx
; X32ABI-NEXT: callq foo7
; X32ABI-NEXT: addl $32, %esp
; X32ABI-NEXT: popq %rcx
; X32ABI-NEXT: retq
; X32-LABEL: t13:
; X32: # %bb.0: # %entry
; X32-NEXT: pushq %rax
; X32-NEXT: subl $8, %esp
; X32-NEXT: movl 16(%edi), %eax
; X32-NEXT: movq (%edi), %rcx
; X32-NEXT: movq 8(%edi), %rdx
; X32-NEXT: xorl %edi, %edi
; X32-NEXT: pushq %rax
; X32-NEXT: pushq %rdx
; X32-NEXT: pushq %rcx
; X32-NEXT: callq foo7
; X32-NEXT: addl $32, %esp
; X32-NEXT: popq %rcx
; X32-NEXT: retq
entry:
%0 = tail call fastcc %struct.ns* @foo7(%struct.cp* byval align 4 %yy, i8 signext 0) nounwind
ret %struct.ns* %0
@ -398,26 +398,26 @@ declare fastcc %struct.ns* @foo7(%struct.cp* byval align 4, i8 signext) nounwind
%struct.__block_literal_2 = type { i8*, i32, i32, i8*, %struct.__block_descriptor_withcopydispose*, void ()* }
define void @t14(%struct.__block_literal_2* nocapture %.block_descriptor) nounwind ssp {
; X32-LABEL: t14:
; X32: # %bb.0: # %entry
; X32-NEXT: subl $12, %esp
; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
; X32-NEXT: movl 20(%eax), %eax
; X32-NEXT: movl %eax, (%esp)
; X32-NEXT: calll *12(%eax)
; X32-NEXT: addl $12, %esp
; X32-NEXT: retl
; X86-LABEL: t14:
; X86: # %bb.0: # %entry
; X86-NEXT: subl $12, %esp
; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
; X86-NEXT: movl 20(%eax), %eax
; X86-NEXT: movl %eax, (%esp)
; X86-NEXT: calll *12(%eax)
; X86-NEXT: addl $12, %esp
; X86-NEXT: retl
;
; X64-LABEL: t14:
; X64: # %bb.0: # %entry
; X64-NEXT: movq 32(%rdi), %rdi
; X64-NEXT: jmpq *16(%rdi) # TAILCALL
;
; X32ABI-LABEL: t14:
; X32ABI: # %bb.0: # %entry
; X32ABI-NEXT: movl 20(%edi), %edi
; X32ABI-NEXT: movl 12(%edi), %eax
; X32ABI-NEXT: jmpq *%rax # TAILCALL
; X32-LABEL: t14:
; X32: # %bb.0: # %entry
; X32-NEXT: movl 20(%edi), %edi
; X32-NEXT: movl 12(%edi), %eax
; X32-NEXT: jmpq *%rax # TAILCALL
entry:
%0 = getelementptr inbounds %struct.__block_literal_2, %struct.__block_literal_2* %.block_descriptor, i64 0, i32 5 ; <void ()**> [#uses=1]
%1 = load void ()*, void ()** %0, align 8 ; <void ()*> [#uses=2]
@ -434,17 +434,17 @@ entry:
%struct.foo = type { [4 x i32] }
define void @t15(%struct.foo* noalias sret %agg.result) nounwind {
; X32-LABEL: t15:
; X32: # %bb.0:
; X32-NEXT: pushl %esi
; X32-NEXT: subl $8, %esp
; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
; X32-NEXT: movl %esi, %ecx
; X32-NEXT: calll f
; X32-NEXT: movl %esi, %eax
; X32-NEXT: addl $8, %esp
; X32-NEXT: popl %esi
; X32-NEXT: retl $4
; X86-LABEL: t15:
; X86: # %bb.0:
; X86-NEXT: pushl %esi
; X86-NEXT: subl $8, %esp
; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
; X86-NEXT: movl %esi, %ecx
; X86-NEXT: calll f
; X86-NEXT: movl %esi, %eax
; X86-NEXT: addl $8, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
;
; X64-LABEL: t15:
; X64: # %bb.0:
@ -455,14 +455,14 @@ define void @t15(%struct.foo* noalias sret %agg.result) nounwind {
; X64-NEXT: popq %rbx
; X64-NEXT: retq
;
; X32ABI-LABEL: t15:
; X32ABI: # %bb.0:
; X32ABI-NEXT: pushq %rbx
; X32ABI-NEXT: movl %edi, %ebx
; X32ABI-NEXT: callq f
; X32ABI-NEXT: movl %ebx, %eax
; X32ABI-NEXT: popq %rbx
; X32ABI-NEXT: retq
; X32-LABEL: t15:
; X32: # %bb.0:
; X32-NEXT: pushq %rbx
; X32-NEXT: movl %edi, %ebx
; X32-NEXT: callq f
; X32-NEXT: movl %ebx, %eax
; X32-NEXT: popq %rbx
; X32-NEXT: retq
tail call fastcc void @f(%struct.foo* noalias sret %agg.result) nounwind
ret void
}
@ -470,21 +470,21 @@ define void @t15(%struct.foo* noalias sret %agg.result) nounwind {
declare void @f(%struct.foo* noalias sret) nounwind
define void @t16() nounwind ssp {
; X32-LABEL: t16:
; X32: # %bb.0: # %entry
; X32-NEXT: subl $12, %esp
; X32-NEXT: calll bar4
; X32-NEXT: fstp %st(0)
; X32-NEXT: addl $12, %esp
; X32-NEXT: retl
; X86-LABEL: t16:
; X86: # %bb.0: # %entry
; X86-NEXT: subl $12, %esp
; X86-NEXT: calll bar4
; X86-NEXT: fstp %st(0)
; X86-NEXT: addl $12, %esp
; X86-NEXT: retl
;
; X64-LABEL: t16:
; X64: # %bb.0: # %entry
; X64-NEXT: jmp bar4 # TAILCALL
;
; X32ABI-LABEL: t16:
; X32ABI: # %bb.0: # %entry
; X32ABI-NEXT: jmp bar4 # TAILCALL
; X32-LABEL: t16:
; X32: # %bb.0: # %entry
; X32-NEXT: jmp bar4 # TAILCALL
entry:
%0 = tail call double @bar4() nounwind
ret void
@ -494,19 +494,19 @@ declare double @bar4()
; rdar://6283267
define void @t17() nounwind ssp {
; X32-LABEL: t17:
; X32: # %bb.0: # %entry
; X32-NEXT: jmp bar5 # TAILCALL
; X86-LABEL: t17:
; X86: # %bb.0: # %entry
; X86-NEXT: jmp bar5 # TAILCALL
;
; X64-LABEL: t17:
; X64: # %bb.0: # %entry
; X64-NEXT: xorl %eax, %eax
; X64-NEXT: jmp bar5 # TAILCALL
;
; X32ABI-LABEL: t17:
; X32ABI: # %bb.0: # %entry
; X32ABI-NEXT: xorl %eax, %eax
; X32ABI-NEXT: jmp bar5 # TAILCALL
; X32-LABEL: t17:
; X32: # %bb.0: # %entry
; X32-NEXT: xorl %eax, %eax
; X32-NEXT: jmp bar5 # TAILCALL
entry:
tail call void (...) @bar5() nounwind
ret void
@ -516,23 +516,23 @@ declare void @bar5(...)
; rdar://7774847
define void @t18() nounwind ssp {
; X32-LABEL: t18:
; X32: # %bb.0: # %entry
; X32-NEXT: subl $12, %esp
; X32-NEXT: calll bar6
; X32-NEXT: fstp %st(0)
; X32-NEXT: addl $12, %esp
; X32-NEXT: retl
; X86-LABEL: t18:
; X86: # %bb.0: # %entry
; X86-NEXT: subl $12, %esp
; X86-NEXT: calll bar6
; X86-NEXT: fstp %st(0)
; X86-NEXT: addl $12, %esp
; X86-NEXT: retl
;
; X64-LABEL: t18:
; X64: # %bb.0: # %entry
; X64-NEXT: xorl %eax, %eax
; X64-NEXT: jmp bar6 # TAILCALL
;
; X32ABI-LABEL: t18:
; X32ABI: # %bb.0: # %entry
; X32ABI-NEXT: xorl %eax, %eax
; X32ABI-NEXT: jmp bar6 # TAILCALL
; X32-LABEL: t18:
; X32: # %bb.0: # %entry
; X32-NEXT: xorl %eax, %eax
; X32-NEXT: jmp bar6 # TAILCALL
entry:
%0 = tail call double (...) @bar6() nounwind
ret void
@ -541,16 +541,16 @@ entry:
declare double @bar6(...)
define void @t19() alignstack(32) nounwind {
; X32-LABEL: t19:
; X32: # %bb.0: # %entry
; X32-NEXT: pushl %ebp
; X32-NEXT: movl %esp, %ebp
; X32-NEXT: andl $-32, %esp
; X32-NEXT: subl $32, %esp
; X32-NEXT: calll foo
; X32-NEXT: movl %ebp, %esp
; X32-NEXT: popl %ebp
; X32-NEXT: retl
; X86-LABEL: t19:
; X86: # %bb.0: # %entry
; X86-NEXT: pushl %ebp
; X86-NEXT: movl %esp, %ebp
; X86-NEXT: andl $-32, %esp
; X86-NEXT: subl $32, %esp
; X86-NEXT: calll foo
; X86-NEXT: movl %ebp, %esp
; X86-NEXT: popl %ebp
; X86-NEXT: retl
;
; X64-LABEL: t19:
; X64: # %bb.0: # %entry
@ -563,16 +563,16 @@ define void @t19() alignstack(32) nounwind {
; X64-NEXT: popq %rbp
; X64-NEXT: retq
;
; X32ABI-LABEL: t19:
; X32ABI: # %bb.0: # %entry
; X32ABI-NEXT: pushq %rbp
; X32ABI-NEXT: movl %esp, %ebp
; X32ABI-NEXT: andl $-32, %esp
; X32ABI-NEXT: subl $32, %esp
; X32ABI-NEXT: callq foo
; X32ABI-NEXT: movl %ebp, %esp
; X32ABI-NEXT: popq %rbp
; X32ABI-NEXT: retq
; X32-LABEL: t19:
; X32: # %bb.0: # %entry
; X32-NEXT: pushq %rbp
; X32-NEXT: movl %esp, %ebp
; X32-NEXT: andl $-32, %esp
; X32-NEXT: subl $32, %esp
; X32-NEXT: callq foo
; X32-NEXT: movl %ebp, %esp
; X32-NEXT: popq %rbp
; X32-NEXT: retq
entry:
tail call void @foo() nounwind
ret void
@ -583,23 +583,23 @@ entry:
; rdar://7874780
define double @t20(double %x) nounwind {
; X32-LABEL: t20:
; X32: # %bb.0: # %entry
; X32-NEXT: subl $12, %esp
; X32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
; X32-NEXT: calll foo20
; X32-NEXT: movsd %xmm0, (%esp)
; X32-NEXT: fldl (%esp)
; X32-NEXT: addl $12, %esp
; X32-NEXT: retl
; X86-LABEL: t20:
; X86: # %bb.0: # %entry
; X86-NEXT: subl $12, %esp
; X86-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
; X86-NEXT: calll foo20
; X86-NEXT: movsd %xmm0, (%esp)
; X86-NEXT: fldl (%esp)
; X86-NEXT: addl $12, %esp
; X86-NEXT: retl
;
; X64-LABEL: t20:
; X64: # %bb.0: # %entry
; X64-NEXT: jmp foo20 # TAILCALL
;
; X32ABI-LABEL: t20:
; X32ABI: # %bb.0: # %entry
; X32ABI-NEXT: jmp foo20 # TAILCALL
; X32-LABEL: t20:
; X32: # %bb.0: # %entry
; X32-NEXT: jmp foo20 # TAILCALL
entry:
%0 = tail call fastcc double @foo20(double %x) nounwind
ret double %0
@ -609,20 +609,16 @@ declare fastcc double @foo20(double) nounwind
; bug 28417
define fastcc void @t21_sret_to_sret(%struct.foo* noalias sret %agg.result) nounwind {
; 32-LABEL: t21_sret_to_sret:
; 32: jmp {{_?}}t21_f_sret
; 64-LABEL: t21_sret_to_sret:
; 64: jmp {{_?}}t21_f_sret
; X32-LABEL: t21_sret_to_sret:
; X32: # %bb.0:
; X32-NEXT: pushl %esi
; X32-NEXT: subl $8, %esp
; X32-NEXT: movl %ecx, %esi
; X32-NEXT: calll t21_f_sret
; X32-NEXT: movl %esi, %eax
; X32-NEXT: addl $8, %esp
; X32-NEXT: popl %esi
; X32-NEXT: retl
; X86-LABEL: t21_sret_to_sret:
; X86: # %bb.0:
; X86-NEXT: pushl %esi
; X86-NEXT: subl $8, %esp
; X86-NEXT: movl %ecx, %esi
; X86-NEXT: calll t21_f_sret
; X86-NEXT: movl %esi, %eax
; X86-NEXT: addl $8, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl
;
; X64-LABEL: t21_sret_to_sret:
; X64: # %bb.0:
@ -633,35 +629,29 @@ define fastcc void @t21_sret_to_sret(%struct.foo* noalias sret %agg.result) noun
; X64-NEXT: popq %rbx
; X64-NEXT: retq
;
; X32ABI-LABEL: t21_sret_to_sret:
; X32ABI: # %bb.0:
; X32ABI-NEXT: pushq %rbx
; X32ABI-NEXT: movl %edi, %ebx
; X32ABI-NEXT: callq t21_f_sret
; X32ABI-NEXT: movl %ebx, %eax
; X32ABI-NEXT: popq %rbx
; X32ABI-NEXT: retq
; X32-LABEL: t21_sret_to_sret:
; X32: # %bb.0:
; X32-NEXT: pushq %rbx
; X32-NEXT: movl %edi, %ebx
; X32-NEXT: callq t21_f_sret
; X32-NEXT: movl %ebx, %eax
; X32-NEXT: popq %rbx
; X32-NEXT: retq
tail call fastcc void @t21_f_sret(%struct.foo* noalias sret %agg.result) nounwind
ret void
}
define fastcc void @t21_sret_to_non_sret(%struct.foo* noalias sret %agg.result) nounwind {
; 32-LABEL: t21_sret_to_non_sret:
; 32: calll {{_?}}t21_f_non_sret
; 32: retl
; 64-LABEL: t21_sret_to_non_sret:
; 64: callq {{_?}}t21_f_non_sret
; 64: retq
; X32-LABEL: t21_sret_to_non_sret:
; X32: # %bb.0:
; X32-NEXT: pushl %esi
; X32-NEXT: subl $8, %esp
; X32-NEXT: movl %ecx, %esi
; X32-NEXT: calll t21_f_non_sret
; X32-NEXT: movl %esi, %eax
; X32-NEXT: addl $8, %esp
; X32-NEXT: popl %esi
; X32-NEXT: retl
; X86-LABEL: t21_sret_to_non_sret:
; X86: # %bb.0:
; X86-NEXT: pushl %esi
; X86-NEXT: subl $8, %esp
; X86-NEXT: movl %ecx, %esi
; X86-NEXT: calll t21_f_non_sret
; X86-NEXT: movl %esi, %eax
; X86-NEXT: addl $8, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl
;
; X64-LABEL: t21_sret_to_non_sret:
; X64: # %bb.0:
@ -672,29 +662,25 @@ define fastcc void @t21_sret_to_non_sret(%struct.foo* noalias sret %agg.result)
; X64-NEXT: popq %rbx
; X64-NEXT: retq
;
; X32ABI-LABEL: t21_sret_to_non_sret:
; X32ABI: # %bb.0:
; X32ABI-NEXT: pushq %rbx
; X32ABI-NEXT: movl %edi, %ebx
; X32ABI-NEXT: callq t21_f_non_sret
; X32ABI-NEXT: movl %ebx, %eax
; X32ABI-NEXT: popq %rbx
; X32ABI-NEXT: retq
; X32-LABEL: t21_sret_to_non_sret:
; X32: # %bb.0:
; X32-NEXT: pushq %rbx
; X32-NEXT: movl %edi, %ebx
; X32-NEXT: callq t21_f_non_sret
; X32-NEXT: movl %ebx, %eax
; X32-NEXT: popq %rbx
; X32-NEXT: retq
tail call fastcc void @t21_f_non_sret(%struct.foo* %agg.result) nounwind
ret void
}
define fastcc void @t21_non_sret_to_sret(%struct.foo* %agg.result) nounwind {
; 32-LABEL: t21_non_sret_to_sret:
; 32: jmp {{_?}}t21_f_sret
; 64-LABEL: t21_non_sret_to_sret:
; 64: jmp {{_?}}t21_f_sret
; X32-LABEL: t21_non_sret_to_sret:
; X32: # %bb.0:
; X32-NEXT: subl $12, %esp
; X32-NEXT: calll t21_f_sret
; X32-NEXT: addl $12, %esp
; X32-NEXT: retl
; X86-LABEL: t21_non_sret_to_sret:
; X86: # %bb.0:
; X86-NEXT: subl $12, %esp
; X86-NEXT: calll t21_f_sret
; X86-NEXT: addl $12, %esp
; X86-NEXT: retl
;
; X64-LABEL: t21_non_sret_to_sret:
; X64: # %bb.0:
@ -703,12 +689,12 @@ define fastcc void @t21_non_sret_to_sret(%struct.foo* %agg.result) nounwind {
; X64-NEXT: popq %rax
; X64-NEXT: retq
;
; X32ABI-LABEL: t21_non_sret_to_sret:
; X32ABI: # %bb.0:
; X32ABI-NEXT: pushq %rax
; X32ABI-NEXT: callq t21_f_sret
; X32ABI-NEXT: popq %rax
; X32ABI-NEXT: retq
; X32-LABEL: t21_non_sret_to_sret:
; X32: # %bb.0:
; X32-NEXT: pushq %rax
; X32-NEXT: callq t21_f_sret
; X32-NEXT: popq %rax
; X32-NEXT: retq
tail call fastcc void @t21_f_sret(%struct.foo* noalias sret %agg.result) nounwind
ret void
}