[ELF] Make SyntheticSection parameter order match InputSection
[llvm-project.git] / llvm / test / CodeGen / Thumb2 / thumb2-execute-only-long-calls.ll
blob79a6f06c6eb781f7db7b2920302feb9de651e888
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
4 define void @fn() #0 {
5 entry:
6 ; CHECK-LABEL: fn:
7 ; CHECK:       ldr [[REG:r[0-9]+]], .LCPI0_0
8 ; CHECK-NEXT:  blx [[REG]]
9 ; CHECK:       .LCPI0_0:
10 ; CHECK-NEXT:  .long   bar
11   call void @bar()
12   ret void
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]]
26 ; RWPI-NOT:   .LCPI1_0:
27 entry:
28   call void @bar()
29   ret void
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()