1
; RUN: llc < %s -march=x86 -asm-verbose=false | FileCheck %s -check-prefix=32
2
; RUN: llc < %s -march=x86-64 -asm-verbose=false | FileCheck %s -check-prefix=64
4
define void @t1(i32 %x) nounwind ssp {
11
tail call void @foo() nounwind
17
define void @t2() nounwind ssp {
24
%0 = tail call i32 @foo2() nounwind
30
define void @t3() nounwind ssp {
37
%0 = tail call i32 @foo3() nounwind
43
define void @t4(void (i32)* nocapture %x) nounwind ssp {
47
; FIXME: gcc can generate a tailcall for this. But it's tricky.
52
tail call void %x(i32 0) nounwind
56
define void @t5(void ()* nocapture %x) nounwind ssp {
65
tail call void %x() nounwind
69
define i32 @t6(i32 %x) nounwind ssp {
78
%0 = icmp slt i32 %x, 10
79
br i1 %0, label %bb, label %bb1
82
%1 = add nsw i32 %x, -1
83
%2 = tail call i32 @t6(i32 %1) nounwind ssp
87
%3 = tail call i32 @bar(i32 %x) nounwind
93
define i32 @t7(i32 %a, i32 %b, i32 %c) nounwind ssp {
100
%0 = tail call i32 @bar2(i32 %a, i32 %b, i32 %c) nounwind
104
declare i32 @bar2(i32, i32, i32)
106
define signext i16 @t8() nounwind ssp {
109
; 32: call {{_?}}bar3
112
; 64: callq {{_?}}bar3
113
%0 = tail call signext i16 @bar3() nounwind ; <i16> [#uses=1]
117
declare signext i16 @bar3()
119
define signext i16 @t9(i32 (i32)* nocapture %x) nounwind ssp {
126
%0 = bitcast i32 (i32)* %x to i16 (i32)*
127
%1 = tail call signext i16 %0(i32 0) nounwind
131
define void @t10() nounwind ssp {
138
%0 = tail call i32 @foo4() noreturn nounwind
144
define i32 @t11(i32 %x, i32 %y, i32 %z.0, i32 %z.1, i32 %z.2) nounwind ssp {
145
; In 32-bit mode, it's emitting a bunch of dead loads that are not being
146
; eliminated currently.
149
; 32-NOT: subl ${{[0-9]+}}, %esp
152
; 32-NOT: addl ${{[0-9]+}}, %esp
156
; 64-NOT: subq ${{[0-9]+}}, %esp
157
; 64-NOT: addq ${{[0-9]+}}, %esp
160
%0 = icmp eq i32 %x, 0
161
br i1 %0, label %bb6, label %bb
164
%1 = tail call i32 @foo5(i32 %x, i32 %y, i32 %z.0, i32 %z.1, i32 %z.2) nounwind
171
declare i32 @foo5(i32, i32, i32, i32, i32)
173
%struct.t = type { i32, i32, i32, i32, i32 }
175
define i32 @t12(i32 %x, i32 %y, %struct.t* byval align 4 %z) nounwind ssp {
177
; 32-NOT: subl ${{[0-9]+}}, %esp
178
; 32-NOT: addl ${{[0-9]+}}, %esp
182
; 64-NOT: subq ${{[0-9]+}}, %esp
183
; 64-NOT: addq ${{[0-9]+}}, %esp
186
%0 = icmp eq i32 %x, 0
187
br i1 %0, label %bb2, label %bb
190
%1 = tail call i32 @foo6(i32 %x, i32 %y, %struct.t* byval align 4 %z) nounwind
197
declare i32 @foo6(i32, i32, %struct.t* byval align 4)
200
%struct.ns = type { i32, i32 }
201
%struct.cp = type { float, float }
203
define %struct.ns* @t13(%struct.cp* %yy) nounwind ssp {
214
%0 = tail call fastcc %struct.ns* @foo7(%struct.cp* byval align 4 %yy, i8 signext 0) nounwind
218
declare fastcc %struct.ns* @foo7(%struct.cp* byval align 4, i8 signext) nounwind ssp