1 ; RUN: llc -mtriple=arm-- --relocation-model=rwpi %s -o - | \
2 ; RUN: FileCheck %s --check-prefixes=RWPI
3 ; RUN: llc -mtriple=arm-- --relocation-model=ropi %s -o - | \
4 ; RUN: FileCheck %s --check-prefixes=ROPI
5 ; RUN: llc -mtriple=arm-- --relocation-model=pic %s -o - | \
6 ; RUN: FileCheck %s --check-prefixes=PIC
8 ; RWPI: ldr {{r[0-9]+}}, .LCPI0_0
10 ; RWPI-NEXT: .long __stack_chk_guard(sbrel)
12 ; ROPI: ldr {{r[0-9]+}}, .LCPI0_0
14 ; ROPI-NEXT: .long __stack_chk_guard
16 ; PIC: ldr {{r[0-9]+}}, .LCPI0_0
19 ; PIC-NEXT: .long __stack_chk_guard(GOT_PREL)-((.LPC0_0+8)-.Ltmp0)
21 define dso_local i32 @foo(i32 %t) nounwind sspstrong {
23 %vla = alloca i32, i32 %t
24 %call = call i32 @baz(ptr %vla)
28 declare dso_local i32 @baz(ptr)
30 !llvm.module.flags = !{!0}
31 !0 = !{i32 7, !"PIC Level", i32 2}