1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple thumbv4t-eabi < %s | FileCheck %s --check-prefix=CHECK-V4T
3 ; RUN: llc -mtriple armv8m.base-eabi < %s | FileCheck %s --check-prefix=CHECK-V8M
5 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
7 ; Function Attrs: nounwind
8 define <4 x i32> @f() local_unnamed_addr #0 {
10 ; CHECK-V4T: @ %bb.0: @ %entry
11 ; CHECK-V4T-NEXT: .save {r7, lr}
12 ; CHECK-V4T-NEXT: push {r7, lr}
13 ; CHECK-V4T-NEXT: .setfp r7, sp
14 ; CHECK-V4T-NEXT: add r7, sp, #0
15 ; CHECK-V4T-NEXT: movs r0, #1
16 ; CHECK-V4T-NEXT: bl h
17 ; CHECK-V4T-NEXT: movs r1, #2
18 ; CHECK-V4T-NEXT: movs r2, #3
19 ; CHECK-V4T-NEXT: movs r3, #4
20 ; CHECK-V4T-NEXT: bl g
21 ; CHECK-V4T-NEXT: pop {r7}
22 ; CHECK-V4T-NEXT: mov r12, r0
23 ; CHECK-V4T-NEXT: pop {r0}
24 ; CHECK-V4T-NEXT: mov lr, r0
25 ; CHECK-V4T-NEXT: mov r0, r12
26 ; CHECK-V4T-NEXT: bx lr
29 ; CHECK-V8M: @ %bb.0: @ %entry
30 ; CHECK-V8M-NEXT: .save {r7, lr}
31 ; CHECK-V8M-NEXT: push {r7, lr}
32 ; CHECK-V8M-NEXT: .setfp r7, sp
33 ; CHECK-V8M-NEXT: add r7, sp, #0
34 ; CHECK-V8M-NEXT: movs r0, #1
35 ; CHECK-V8M-NEXT: bl h
36 ; CHECK-V8M-NEXT: movs r1, #2
37 ; CHECK-V8M-NEXT: movs r2, #3
38 ; CHECK-V8M-NEXT: movs r3, #4
39 ; CHECK-V8M-NEXT: pop {r7}
40 ; CHECK-V8M-NEXT: mov r12, r0
41 ; CHECK-V8M-NEXT: pop {r0}
42 ; CHECK-V8M-NEXT: mov lr, r0
43 ; CHECK-V8M-NEXT: mov r0, r12
46 %call = tail call i32 @h(i32 1)
47 %call1 = tail call <4 x i32> @g(i32 %call, i32 2, i32 3, i32 4)
51 declare <4 x i32> @g(i32, i32, i32, i32) local_unnamed_addr
53 declare i32 @h(i32) local_unnamed_addr
55 attributes #0 = { "disable-tail-calls"="false" "frame-pointer"="all" }