brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 79a6f06 Raw
36 lines · plain
1; RUN: llc < %s -mtriple=thumbv7em-arm-none-eabi -relocation-model=static | FileCheck %s -check-prefixes=CHECK,STATIC2; RUN: llc < %s -mtriple=thumbv7em-arm-none-eabi -relocation-model=rwpi | FileCheck %s -check-prefixes=CHECK,RWPI3 4define void @fn() #0 {5entry:6; CHECK-LABEL: fn:7; CHECK:       ldr [[REG:r[0-9]+]], .LCPI0_08; CHECK-NEXT:  blx [[REG]]9; CHECK:       .LCPI0_0:10; CHECK-NEXT:  .long   bar11  call void @bar()12  ret void13}14 15define void @execute_only_fn() #1 {16; STATIC-LABEL: execute_only_fn:17; STATIC:       movw    [[REG0:r[0-9]+]], :lower16:bar18; STATIC-NEXT:  movt    [[REG0]], :upper16:bar19; STATIC-NEXT:  blx     [[REG0]]20; STATIC-NOT:   .LCPI0_0:21 22; RWPI-LABEL: execute_only_fn:23; RWPI:       movw    [[REG0:r[0-9]+]], :lower16:bar24; RWPI-NEXT:  movt    [[REG0]], :upper16:bar25; RWPI-NEXT:  blx     [[REG0]]26; RWPI-NOT:   .LCPI1_0:27entry:28  call void @bar()29  ret void30}31 32attributes #0 = { noinline optnone "target-features"="+thumb-mode,+long-calls" }33attributes #1 = { noinline optnone "target-features"="+execute-only,+thumb-mode,+long-calls" }34 35declare dso_local void @bar()36