• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -mtriple=i686-linux   -mcpu=core2 -mattr=+sse2 | FileCheck %s --check-prefix=X32
3; RUN: llc < %s -mtriple=x86_64-linux -mcpu=core2 -mattr=+sse2 | FileCheck %s --check-prefix=X64
4; RUN: llc < %s -mtriple=x86_64-linux-gnux32 -mcpu=core2 -mattr=+sse2  | FileCheck %s --check-prefix=X32ABI
5
6define void @t1(i32 %x) nounwind ssp {
7; X32-LABEL: t1:
8; X32:       # %bb.0:
9; X32-NEXT:    jmp foo # TAILCALL
10;
11; X64-LABEL: t1:
12; X64:       # %bb.0:
13; X64-NEXT:    jmp foo # TAILCALL
14;
15; X32ABI-LABEL: t1:
16; X32ABI:       # %bb.0:
17; X32ABI-NEXT:    jmp foo # TAILCALL
18  tail call void @foo() nounwind
19  ret void
20}
21
22declare void @foo()
23
24define void @t2() nounwind ssp {
25; X32-LABEL: t2:
26; X32:       # %bb.0:
27; X32-NEXT:    jmp foo2 # TAILCALL
28;
29; X64-LABEL: t2:
30; X64:       # %bb.0:
31; X64-NEXT:    jmp foo2 # TAILCALL
32;
33; X32ABI-LABEL: t2:
34; X32ABI:       # %bb.0:
35; X32ABI-NEXT:    jmp foo2 # TAILCALL
36  %t0 = tail call i32 @foo2() nounwind
37  ret void
38}
39
40declare i32 @foo2()
41
42define void @t3() nounwind ssp {
43; X32-LABEL: t3:
44; X32:       # %bb.0:
45; X32-NEXT:    jmp foo3 # TAILCALL
46;
47; X64-LABEL: t3:
48; X64:       # %bb.0:
49; X64-NEXT:    jmp foo3 # TAILCALL
50;
51; X32ABI-LABEL: t3:
52; X32ABI:       # %bb.0:
53; X32ABI-NEXT:    jmp foo3 # TAILCALL
54  %t0 = tail call i32 @foo3() nounwind
55  ret void
56}
57
58declare i32 @foo3()
59
60define void @t4(void (i32)* nocapture %x) nounwind ssp {
61; X32-LABEL: t4:
62; X32:       # %bb.0:
63; X32-NEXT:    subl $12, %esp
64; X32-NEXT:    movl $0, (%esp)
65; X32-NEXT:    calll *{{[0-9]+}}(%esp)
66; X32-NEXT:    addl $12, %esp
67; X32-NEXT:    retl
68;
69; X64-LABEL: t4:
70; X64:       # %bb.0:
71; X64-NEXT:    movq %rdi, %rax
72; X64-NEXT:    xorl %edi, %edi
73; X64-NEXT:    jmpq *%rax # TAILCALL
74;
75; X32ABI-LABEL: t4:
76; X32ABI:       # %bb.0:
77; X32ABI-NEXT:    movl %edi, %eax
78; X32ABI-NEXT:    xorl %edi, %edi
79; X32ABI-NEXT:    jmpq *%rax # TAILCALL
80  tail call void %x(i32 0) nounwind
81  ret void
82}
83
84; FIXME: This isn't needed since x32 psABI specifies that callers must
85;        zero-extend pointers passed in registers.
86
87define void @t5(void ()* nocapture %x) nounwind ssp {
88; X32-LABEL: t5:
89; X32:       # %bb.0:
90; X32-NEXT:    jmpl *{{[0-9]+}}(%esp) # TAILCALL
91;
92; X64-LABEL: t5:
93; X64:       # %bb.0:
94; X64-NEXT:    jmpq *%rdi # TAILCALL
95;
96; X32ABI-LABEL: t5:
97; X32ABI:       # %bb.0:
98; X32ABI-NEXT:    movl %edi, %eax
99; X32ABI-NEXT:    jmpq *%rax # TAILCALL
100  tail call void %x() nounwind
101  ret void
102}
103
104define i32 @t6(i32 %x) nounwind ssp {
105; X32-LABEL: t6:
106; X32:       # %bb.0:
107; X32-NEXT:    subl $12, %esp
108; X32-NEXT:    movl {{[0-9]+}}(%esp), %eax
109; X32-NEXT:    cmpl $9, %eax
110; X32-NEXT:    jg .LBB5_2
111; X32-NEXT:  # %bb.1: # %bb
112; X32-NEXT:    decl %eax
113; X32-NEXT:    movl %eax, (%esp)
114; X32-NEXT:    calll t6
115; X32-NEXT:    addl $12, %esp
116; X32-NEXT:    retl
117; X32-NEXT:  .LBB5_2: # %bb1
118; X32-NEXT:    addl $12, %esp
119; X32-NEXT:    jmp bar # TAILCALL
120;
121; X64-LABEL: t6:
122; X64:       # %bb.0:
123; X64-NEXT:    cmpl $9, %edi
124; X64-NEXT:    jg .LBB5_2
125; X64-NEXT:  # %bb.1: # %bb
126; X64-NEXT:    decl %edi
127; X64-NEXT:    jmp t6 # TAILCALL
128; X64-NEXT:  .LBB5_2: # %bb1
129; X64-NEXT:    jmp bar # TAILCALL
130;
131; X32ABI-LABEL: t6:
132; X32ABI:       # %bb.0:
133; X32ABI-NEXT:    cmpl $9, %edi
134; X32ABI-NEXT:    jg .LBB5_2
135; X32ABI-NEXT:  # %bb.1: # %bb
136; X32ABI-NEXT:    decl %edi
137; X32ABI-NEXT:    jmp t6 # TAILCALL
138; X32ABI-NEXT:  .LBB5_2: # %bb1
139; X32ABI-NEXT:    jmp bar # TAILCALL
140  %t0 = icmp slt i32 %x, 10
141  br i1 %t0, label %bb, label %bb1
142
143bb:
144  %t1 = add nsw i32 %x, -1
145  %t2 = tail call i32 @t6(i32 %t1) nounwind ssp
146  ret i32 %t2
147
148bb1:
149  %t3 = tail call i32 @bar(i32 %x) nounwind
150  ret i32 %t3
151}
152
153declare i32 @bar(i32)
154
155define i32 @t7(i32 %a, i32 %b, i32 %c) nounwind ssp {
156; X32-LABEL: t7:
157; X32:       # %bb.0:
158; X32-NEXT:    jmp bar2 # TAILCALL
159;
160; X64-LABEL: t7:
161; X64:       # %bb.0:
162; X64-NEXT:    jmp bar2 # TAILCALL
163;
164; X32ABI-LABEL: t7:
165; X32ABI:       # %bb.0:
166; X32ABI-NEXT:    jmp bar2 # TAILCALL
167  %t0 = tail call i32 @bar2(i32 %a, i32 %b, i32 %c) nounwind
168  ret i32 %t0
169}
170
171declare i32 @bar2(i32, i32, i32)
172
173define signext i16 @t8() nounwind ssp {
174; X32-LABEL: t8:
175; X32:       # %bb.0: # %entry
176; X32-NEXT:    jmp bar3 # TAILCALL
177;
178; X64-LABEL: t8:
179; X64:       # %bb.0: # %entry
180; X64-NEXT:    jmp bar3 # TAILCALL
181;
182; X32ABI-LABEL: t8:
183; X32ABI:       # %bb.0: # %entry
184; X32ABI-NEXT:    jmp bar3 # TAILCALL
185entry:
186  %0 = tail call signext i16 @bar3() nounwind      ; <i16> [#uses=1]
187  ret i16 %0
188}
189
190declare signext i16 @bar3()
191
192define signext i16 @t9(i32 (i32)* nocapture %x) nounwind ssp {
193; X32-LABEL: t9:
194; X32:       # %bb.0: # %entry
195; X32-NEXT:    subl $12, %esp
196; X32-NEXT:    movl $0, (%esp)
197; X32-NEXT:    calll *{{[0-9]+}}(%esp)
198; X32-NEXT:    addl $12, %esp
199; X32-NEXT:    retl
200;
201; X64-LABEL: t9:
202; X64:       # %bb.0: # %entry
203; X64-NEXT:    movq %rdi, %rax
204; X64-NEXT:    xorl %edi, %edi
205; X64-NEXT:    jmpq *%rax # TAILCALL
206;
207; X32ABI-LABEL: t9:
208; X32ABI:       # %bb.0: # %entry
209; X32ABI-NEXT:    movl %edi, %eax
210; X32ABI-NEXT:    xorl %edi, %edi
211; X32ABI-NEXT:    jmpq *%rax # TAILCALL
212entry:
213  %0 = bitcast i32 (i32)* %x to i16 (i32)*
214  %1 = tail call signext i16 %0(i32 0) nounwind
215  ret i16 %1
216}
217
218define void @t10() nounwind ssp {
219; X32-LABEL: t10:
220; X32:       # %bb.0: # %entry
221; X32-NEXT:    subl $12, %esp
222; X32-NEXT:    calll foo4
223;
224; X64-LABEL: t10:
225; X64:       # %bb.0: # %entry
226; X64-NEXT:    pushq %rax
227; X64-NEXT:    callq foo4
228;
229; X32ABI-LABEL: t10:
230; X32ABI:       # %bb.0: # %entry
231; X32ABI-NEXT:    pushq %rax
232; X32ABI-NEXT:    callq foo4
233entry:
234  %0 = tail call i32 @foo4() noreturn nounwind
235  unreachable
236}
237
238declare i32 @foo4()
239
240; In 32-bit mode, it's emitting a bunch of dead loads that are not being
241; eliminated currently.
242
243define i32 @t11(i32 %x, i32 %y, i32 %z.0, i32 %z.1, i32 %z.2) nounwind ssp {
244; X32-LABEL: t11:
245; X32:       # %bb.0: # %entry
246; X32-NEXT:    movl {{[0-9]+}}(%esp), %eax
247; X32-NEXT:    testl %eax, %eax
248; X32-NEXT:    je .LBB10_1
249; X32-NEXT:  # %bb.2: # %bb
250; X32-NEXT:    jmp foo5 # TAILCALL
251; X32-NEXT:  .LBB10_1: # %bb6
252; X32-NEXT:    xorl %eax, %eax
253; X32-NEXT:    retl
254;
255; X64-LABEL: t11:
256; X64:       # %bb.0: # %entry
257; X64-NEXT:    testl %edi, %edi
258; X64-NEXT:    je .LBB10_1
259; X64-NEXT:  # %bb.2: # %bb
260; X64-NEXT:    jmp foo5 # TAILCALL
261; X64-NEXT:  .LBB10_1: # %bb6
262; X64-NEXT:    xorl %eax, %eax
263; X64-NEXT:    retq
264;
265; X32ABI-LABEL: t11:
266; X32ABI:       # %bb.0: # %entry
267; X32ABI-NEXT:    testl %edi, %edi
268; X32ABI-NEXT:    je .LBB10_1
269; X32ABI-NEXT:  # %bb.2: # %bb
270; X32ABI-NEXT:    jmp foo5 # TAILCALL
271; X32ABI-NEXT:  .LBB10_1: # %bb6
272; X32ABI-NEXT:    xorl %eax, %eax
273; X32ABI-NEXT:    retq
274entry:
275  %0 = icmp eq i32 %x, 0
276  br i1 %0, label %bb6, label %bb
277
278bb:
279  %1 = tail call i32 @foo5(i32 %x, i32 %y, i32 %z.0, i32 %z.1, i32 %z.2) nounwind
280  ret i32 %1
281
282bb6:
283  ret i32 0
284}
285
286declare i32 @foo5(i32, i32, i32, i32, i32)
287
288%struct.t = type { i32, i32, i32, i32, i32 }
289
290define i32 @t12(i32 %x, i32 %y, %struct.t* byval align 4 %z) nounwind ssp {
291; X32-LABEL: t12:
292; X32:       # %bb.0: # %entry
293; X32-NEXT:    movl {{[0-9]+}}(%esp), %eax
294; X32-NEXT:    testl %eax, %eax
295; X32-NEXT:    je .LBB11_1
296; X32-NEXT:  # %bb.2: # %bb
297; X32-NEXT:    jmp foo6 # TAILCALL
298; X32-NEXT:  .LBB11_1: # %bb2
299; X32-NEXT:    xorl %eax, %eax
300; X32-NEXT:    retl
301;
302; X64-LABEL: t12:
303; X64:       # %bb.0: # %entry
304; X64-NEXT:    testl %edi, %edi
305; X64-NEXT:    je .LBB11_1
306; X64-NEXT:  # %bb.2: # %bb
307; X64-NEXT:    jmp foo6 # TAILCALL
308; X64-NEXT:  .LBB11_1: # %bb2
309; X64-NEXT:    xorl %eax, %eax
310; X64-NEXT:    retq
311;
312; X32ABI-LABEL: t12:
313; X32ABI:       # %bb.0: # %entry
314; X32ABI-NEXT:    testl %edi, %edi
315; X32ABI-NEXT:    je .LBB11_1
316; X32ABI-NEXT:  # %bb.2: # %bb
317; X32ABI-NEXT:    jmp foo6 # TAILCALL
318; X32ABI-NEXT:  .LBB11_1: # %bb2
319; X32ABI-NEXT:    xorl %eax, %eax
320; X32ABI-NEXT:    retq
321entry:
322  %0 = icmp eq i32 %x, 0
323  br i1 %0, label %bb2, label %bb
324
325bb:
326  %1 = tail call i32 @foo6(i32 %x, i32 %y, %struct.t* byval align 4 %z) nounwind
327  ret i32 %1
328
329bb2:
330  ret i32 0
331}
332
333declare i32 @foo6(i32, i32, %struct.t* byval align 4)
334
335; rdar://r7717598
336%struct.ns = type { i32, i32 }
337%struct.cp = type { float, float, float, float, float }
338
339define %struct.ns* @t13(%struct.cp* %yy) nounwind ssp {
340; X32-LABEL: t13:
341; X32:       # %bb.0: # %entry
342; X32-NEXT:    subl $28, %esp
343; X32-NEXT:    movl {{[0-9]+}}(%esp), %eax
344; X32-NEXT:    movl 16(%eax), %ecx
345; X32-NEXT:    movl %ecx, {{[0-9]+}}(%esp)
346; X32-NEXT:    movsd {{.*#+}} xmm0 = mem[0],zero
347; X32-NEXT:    movsd {{.*#+}} xmm1 = mem[0],zero
348; X32-NEXT:    movsd %xmm1, {{[0-9]+}}(%esp)
349; X32-NEXT:    movsd %xmm0, (%esp)
350; X32-NEXT:    xorl %ecx, %ecx
351; X32-NEXT:    calll foo7
352; X32-NEXT:    addl $28, %esp
353; X32-NEXT:    retl
354;
355; X64-LABEL: t13:
356; X64:       # %bb.0: # %entry
357; X64-NEXT:    pushq %rax
358; X64-NEXT:    subq $8, %rsp
359; X64-NEXT:    movl 16(%rdi), %eax
360; X64-NEXT:    movq (%rdi), %rcx
361; X64-NEXT:    movq 8(%rdi), %rdx
362; X64-NEXT:    xorl %edi, %edi
363; X64-NEXT:    pushq %rax
364; X64-NEXT:    pushq %rdx
365; X64-NEXT:    pushq %rcx
366; X64-NEXT:    callq foo7
367; X64-NEXT:    addq $32, %rsp
368; X64-NEXT:    popq %rcx
369; X64-NEXT:    retq
370;
371; X32ABI-LABEL: t13:
372; X32ABI:       # %bb.0: # %entry
373; X32ABI-NEXT:    pushq %rax
374; X32ABI-NEXT:    subl $8, %esp
375; X32ABI-NEXT:    movl 16(%edi), %eax
376; X32ABI-NEXT:    movq (%edi), %rcx
377; X32ABI-NEXT:    movq 8(%edi), %rdx
378; X32ABI-NEXT:    xorl %edi, %edi
379; X32ABI-NEXT:    pushq %rax
380; X32ABI-NEXT:    pushq %rdx
381; X32ABI-NEXT:    pushq %rcx
382; X32ABI-NEXT:    callq foo7
383; X32ABI-NEXT:    addl $32, %esp
384; X32ABI-NEXT:    popq %rcx
385; X32ABI-NEXT:    retq
386entry:
387  %0 = tail call fastcc %struct.ns* @foo7(%struct.cp* byval align 4 %yy, i8 signext 0) nounwind
388  ret %struct.ns* %0
389}
390
391; rdar://6195379
392; llvm can't do sibcall for this in 32-bit mode (yet).
393declare fastcc %struct.ns* @foo7(%struct.cp* byval align 4, i8 signext) nounwind ssp
394
395%struct.__block_descriptor = type { i64, i64 }
396%struct.__block_descriptor_withcopydispose = type { i64, i64, i8*, i8* }
397%struct.__block_literal_1 = type { i8*, i32, i32, i8*, %struct.__block_descriptor* }
398%struct.__block_literal_2 = type { i8*, i32, i32, i8*, %struct.__block_descriptor_withcopydispose*, void ()* }
399
400define void @t14(%struct.__block_literal_2* nocapture %.block_descriptor) nounwind ssp {
401; X32-LABEL: t14:
402; X32:       # %bb.0: # %entry
403; X32-NEXT:    subl $12, %esp
404; X32-NEXT:    movl {{[0-9]+}}(%esp), %eax
405; X32-NEXT:    movl 20(%eax), %eax
406; X32-NEXT:    movl %eax, (%esp)
407; X32-NEXT:    calll *12(%eax)
408; X32-NEXT:    addl $12, %esp
409; X32-NEXT:    retl
410;
411; X64-LABEL: t14:
412; X64:       # %bb.0: # %entry
413; X64-NEXT:    movq 32(%rdi), %rdi
414; X64-NEXT:    jmpq *16(%rdi) # TAILCALL
415;
416; X32ABI-LABEL: t14:
417; X32ABI:       # %bb.0: # %entry
418; X32ABI-NEXT:    movl 20(%edi), %edi
419; X32ABI-NEXT:    movl 12(%edi), %eax
420; X32ABI-NEXT:    jmpq *%rax # TAILCALL
421entry:
422  %0 = getelementptr inbounds %struct.__block_literal_2, %struct.__block_literal_2* %.block_descriptor, i64 0, i32 5 ; <void ()**> [#uses=1]
423  %1 = load void ()*, void ()** %0, align 8                 ; <void ()*> [#uses=2]
424  %2 = bitcast void ()* %1 to %struct.__block_literal_1* ; <%struct.__block_literal_1*> [#uses=1]
425  %3 = getelementptr inbounds %struct.__block_literal_1, %struct.__block_literal_1* %2, i64 0, i32 3 ; <i8**> [#uses=1]
426  %4 = load i8*, i8** %3, align 8                      ; <i8*> [#uses=1]
427  %5 = bitcast i8* %4 to void (i8*)*              ; <void (i8*)*> [#uses=1]
428  %6 = bitcast void ()* %1 to i8*                 ; <i8*> [#uses=1]
429  tail call void %5(i8* %6) nounwind
430  ret void
431}
432
433; rdar://7726868
434%struct.foo = type { [4 x i32] }
435
436define void @t15(%struct.foo* noalias sret %agg.result) nounwind  {
437; X32-LABEL: t15:
438; X32:       # %bb.0:
439; X32-NEXT:    pushl %esi
440; X32-NEXT:    subl $8, %esp
441; X32-NEXT:    movl {{[0-9]+}}(%esp), %esi
442; X32-NEXT:    movl %esi, %ecx
443; X32-NEXT:    calll f
444; X32-NEXT:    movl %esi, %eax
445; X32-NEXT:    addl $8, %esp
446; X32-NEXT:    popl %esi
447; X32-NEXT:    retl $4
448;
449; X64-LABEL: t15:
450; X64:       # %bb.0:
451; X64-NEXT:    pushq %rbx
452; X64-NEXT:    movq %rdi, %rbx
453; X64-NEXT:    callq f
454; X64-NEXT:    movq %rbx, %rax
455; X64-NEXT:    popq %rbx
456; X64-NEXT:    retq
457;
458; X32ABI-LABEL: t15:
459; X32ABI:       # %bb.0:
460; X32ABI-NEXT:    pushq %rbx
461; X32ABI-NEXT:    movl %edi, %ebx
462; X32ABI-NEXT:    callq f
463; X32ABI-NEXT:    movl %ebx, %eax
464; X32ABI-NEXT:    popq %rbx
465; X32ABI-NEXT:    retq
466  tail call fastcc void @f(%struct.foo* noalias sret %agg.result) nounwind
467  ret void
468}
469
470declare void @f(%struct.foo* noalias sret) nounwind
471
472define void @t16() nounwind ssp {
473; X32-LABEL: t16:
474; X32:       # %bb.0: # %entry
475; X32-NEXT:    subl $12, %esp
476; X32-NEXT:    calll bar4
477; X32-NEXT:    fstp %st(0)
478; X32-NEXT:    addl $12, %esp
479; X32-NEXT:    retl
480;
481; X64-LABEL: t16:
482; X64:       # %bb.0: # %entry
483; X64-NEXT:    jmp bar4 # TAILCALL
484;
485; X32ABI-LABEL: t16:
486; X32ABI:       # %bb.0: # %entry
487; X32ABI-NEXT:    jmp bar4 # TAILCALL
488entry:
489  %0 = tail call double @bar4() nounwind
490  ret void
491}
492
493declare double @bar4()
494
495; rdar://6283267
496define void @t17() nounwind ssp {
497; X32-LABEL: t17:
498; X32:       # %bb.0: # %entry
499; X32-NEXT:    jmp bar5 # TAILCALL
500;
501; X64-LABEL: t17:
502; X64:       # %bb.0: # %entry
503; X64-NEXT:    xorl %eax, %eax
504; X64-NEXT:    jmp bar5 # TAILCALL
505;
506; X32ABI-LABEL: t17:
507; X32ABI:       # %bb.0: # %entry
508; X32ABI-NEXT:    xorl %eax, %eax
509; X32ABI-NEXT:    jmp bar5 # TAILCALL
510entry:
511  tail call void (...) @bar5() nounwind
512  ret void
513}
514
515declare void @bar5(...)
516
517; rdar://7774847
518define void @t18() nounwind ssp {
519; X32-LABEL: t18:
520; X32:       # %bb.0: # %entry
521; X32-NEXT:    subl $12, %esp
522; X32-NEXT:    calll bar6
523; X32-NEXT:    fstp %st(0)
524; X32-NEXT:    addl $12, %esp
525; X32-NEXT:    retl
526;
527; X64-LABEL: t18:
528; X64:       # %bb.0: # %entry
529; X64-NEXT:    xorl %eax, %eax
530; X64-NEXT:    jmp bar6 # TAILCALL
531;
532; X32ABI-LABEL: t18:
533; X32ABI:       # %bb.0: # %entry
534; X32ABI-NEXT:    xorl %eax, %eax
535; X32ABI-NEXT:    jmp bar6 # TAILCALL
536entry:
537  %0 = tail call double (...) @bar6() nounwind
538  ret void
539}
540
541declare double @bar6(...)
542
543define void @t19() alignstack(32) nounwind {
544; X32-LABEL: t19:
545; X32:       # %bb.0: # %entry
546; X32-NEXT:    pushl %ebp
547; X32-NEXT:    movl %esp, %ebp
548; X32-NEXT:    andl $-32, %esp
549; X32-NEXT:    subl $32, %esp
550; X32-NEXT:    calll foo
551; X32-NEXT:    movl %ebp, %esp
552; X32-NEXT:    popl %ebp
553; X32-NEXT:    retl
554;
555; X64-LABEL: t19:
556; X64:       # %bb.0: # %entry
557; X64-NEXT:    pushq %rbp
558; X64-NEXT:    movq %rsp, %rbp
559; X64-NEXT:    andq $-32, %rsp
560; X64-NEXT:    subq $32, %rsp
561; X64-NEXT:    callq foo
562; X64-NEXT:    movq %rbp, %rsp
563; X64-NEXT:    popq %rbp
564; X64-NEXT:    retq
565;
566; X32ABI-LABEL: t19:
567; X32ABI:       # %bb.0: # %entry
568; X32ABI-NEXT:    pushq %rbp
569; X32ABI-NEXT:    movl %esp, %ebp
570; X32ABI-NEXT:    andl $-32, %esp
571; X32ABI-NEXT:    subl $32, %esp
572; X32ABI-NEXT:    callq foo
573; X32ABI-NEXT:    movl %ebp, %esp
574; X32ABI-NEXT:    popq %rbp
575; X32ABI-NEXT:    retq
576entry:
577  tail call void @foo() nounwind
578  ret void
579}
580
581; If caller / callee calling convention mismatch then check if the return
582; values are returned in the same registers.
583; rdar://7874780
584
585define double @t20(double %x) nounwind {
586; X32-LABEL: t20:
587; X32:       # %bb.0: # %entry
588; X32-NEXT:    subl $12, %esp
589; X32-NEXT:    movsd {{.*#+}} xmm0 = mem[0],zero
590; X32-NEXT:    calll foo20
591; X32-NEXT:    movsd %xmm0, (%esp)
592; X32-NEXT:    fldl (%esp)
593; X32-NEXT:    addl $12, %esp
594; X32-NEXT:    retl
595;
596; X64-LABEL: t20:
597; X64:       # %bb.0: # %entry
598; X64-NEXT:    jmp foo20 # TAILCALL
599;
600; X32ABI-LABEL: t20:
601; X32ABI:       # %bb.0: # %entry
602; X32ABI-NEXT:    jmp foo20 # TAILCALL
603entry:
604  %0 = tail call fastcc double @foo20(double %x) nounwind
605  ret double %0
606}
607
608declare fastcc double @foo20(double) nounwind
609