32 lines · plain
1; RUN: llc -mtriple=arm-- --relocation-model=rwpi %s -o - | \2; RUN: FileCheck %s --check-prefixes=RWPI3; RUN: llc -mtriple=arm-- --relocation-model=ropi %s -o - | \4; RUN: FileCheck %s --check-prefixes=ROPI5; RUN: llc -mtriple=arm-- --relocation-model=pic %s -o - | \6; RUN: FileCheck %s --check-prefixes=PIC7 8; RWPI: ldr {{r[0-9]+}}, .LCPI0_09; RWPI: .LCPI0_0:10; RWPI-NEXT: .long __stack_chk_guard(sbrel)11 12; ROPI: ldr {{r[0-9]+}}, .LCPI0_013; ROPI: .LCPI0_0:14; ROPI-NEXT: .long __stack_chk_guard15 16; PIC: ldr {{r[0-9]+}}, .LCPI0_017; PIC: .LCPI0_0:18; PIC-NEXT: .Ltmp0:19; PIC-NEXT: .long __stack_chk_guard(GOT_PREL)-(.LPC0_0+8-.Ltmp0)20 21define dso_local i32 @foo(i32 %t) nounwind sspstrong {22entry:23 %vla = alloca i32, i32 %t24 %call = call i32 @baz(ptr %vla)25 ret i32 %call26}27 28declare dso_local i32 @baz(ptr)29 30!llvm.module.flags = !{!0}31!0 = !{i32 7, !"PIC Level", i32 2}32