1 ; RUN: llc -mtriple=armv7a-eabi < %s | FileCheck %s --check-prefix=CHECK-ARM
2 ; RUN: llc -mtriple=armv6m-eabi < %s | FileCheck %s --check-prefix=CHECK-THM
4 ; Function Attrs: minsize optsize
5 declare void @g(ptr) local_unnamed_addr #0
7 ; Function Attrs: minsize optsize
8 define void @f() local_unnamed_addr #0 {
10 %i = alloca i32, align 4
11 store i32 1, ptr %i, align 4
12 call void @g(ptr nonnull %i)
16 ; Check unwind info does not mention the registers used for padding, and
17 ; the amount of stack adjustment is the same as in the actual
20 ; CHECK-ARM: .save {r11, lr}
21 ; CHECK-ARM-NEXT: .pad #8
22 ; CHECK-ARM-NEXT: push {r9, r10, r11, lr}
23 ; CHECK-ARM: pop {r2, r3, r11, pc}
25 ; CHECK-THM: .save {r7, lr}
26 ; CHECK-THM-NEXT: .pad #8
27 ; CHECK-THM-NEXT: push {r5, r6, r7, lr}
28 ; CHECK-THM: pop {r2, r3, r7, pc}
31 define void @f1() local_unnamed_addr #1 {
33 %i = alloca i32, align 4
34 store i32 1, ptr %i, align 4
35 call void @g(ptr nonnull %i)
39 ; Check that unwind info is the same whether or not using -Os (minsize attr)
41 ; CHECK-ARM: .save {r11, lr}
42 ; CHECK-ARM-NEXT: push {r11, lr}
43 ; CHECK-ARM-NEXT: .pad #8
45 ; CHECK-THM: .save {r7, lr}
46 ; CHECK-THM-NEXT: push {r7, lr}
47 ; CHECK-THM-NEXT: .pad #8
49 attributes #0 = { minsize optsize }
50 attributes #1 = { optsize }