1 ; RUN: llc < %s -mtriple=thumbv7em-arm-none-eabi -relocation-model=static | FileCheck %s -check-prefixes=CHECK,STATIC
2 ; RUN: llc < %s -mtriple=thumbv7em-arm-none-eabi -relocation-model=rwpi | FileCheck %s -check-prefixes=CHECK,RWPI
7 ; CHECK: ldr [[REG:r[0-9]+]], .LCPI0_0
8 ; CHECK-NEXT: blx [[REG]]
10 ; CHECK-NEXT: .long bar
15 define void @execute_only_fn() #1 {
16 ; STATIC-LABEL: execute_only_fn:
17 ; STATIC: movw [[REG0:r[0-9]+]], :lower16:bar
18 ; STATIC-NEXT: movt [[REG0]], :upper16:bar
19 ; STATIC-NEXT: blx [[REG0]]
20 ; STATIC-NOT: .LCPI0_0:
22 ; RWPI-LABEL: execute_only_fn:
23 ; RWPI: movw [[REG0:r[0-9]+]], :lower16:bar
24 ; RWPI-NEXT: movt [[REG0]], :upper16:bar
25 ; RWPI-NEXT: blx [[REG0]]
32 attributes #0 = { noinline optnone "target-features"="+thumb-mode,+long-calls" }
33 attributes #1 = { noinline optnone "target-features"="+execute-only,+thumb-mode,+long-calls" }
35 declare dso_local void @bar()