1; RUN: llc < %s -mtriple=thumbv8m.base-arm-none-eabi | FileCheck %s
2
3define void @fn() {
4entry:
5; CHECK-LABEL: fn:
6; CHECK:       @ %bb.0: @ %entry
7; CHECK-NEXT:    .save {r4, r5, r6, lr}
8; CHECK-NEXT:    push {r4, r5, r6, lr}
9; CHECK-NEXT:    ldr r6, .LCPI0_0
10; CHECK-NEXT:    .pad #1600
11; CHECK-NEXT:    add sp, r6
12; CHECK: .LCPI0_0:
13; CHECK_NEXT:    long   4294963196
14  %a = alloca [400 x i32], align 4
15  %arraydecay = getelementptr inbounds [400 x i32], [400 x i32]* %a, i32 0, i32 0
16  call void @bar(i32* %arraydecay)
17  ret void
18}
19
20define void @execute_only_fn() #0 {
21entry:
22; CHECK-LABEL: execute_only_fn:
23; CHECK:       @ %bb.0: @ %entry
24; CHECK-NEXT:    .save {r4, r5, r6, lr}
25; CHECK-NEXT:    push {r4, r5, r6, lr}
26; CHECK-NEXT:    movw    r6, #63936
27; CHECK-NEXT:    movt    r6, #65535
28; CHECK-NEXT:    .pad #1600
29; CHECK-NEXT:    add sp, r6
30  %a = alloca [400 x i32], align 4
31  %arraydecay = getelementptr inbounds [400 x i32], [400 x i32]* %a, i32 0, i32 0
32  call void @bar(i32* %arraydecay)
33  ret void
34}
35
36declare dso_local void @bar(i32*)
37
38attributes #0 = { noinline optnone "target-features"="+armv8-m.base,+execute-only,+thumb-mode" }
39