19bb66224SPengxuan Zheng; RUN: llc -mtriple=arm-- --relocation-model=rwpi %s -o - | \ 29bb66224SPengxuan Zheng; RUN: FileCheck %s --check-prefixes=RWPI 39bb66224SPengxuan Zheng; RUN: llc -mtriple=arm-- --relocation-model=ropi %s -o - | \ 49bb66224SPengxuan Zheng; RUN: FileCheck %s --check-prefixes=ROPI 59bb66224SPengxuan Zheng; RUN: llc -mtriple=arm-- --relocation-model=pic %s -o - | \ 69bb66224SPengxuan Zheng; RUN: FileCheck %s --check-prefixes=PIC 79bb66224SPengxuan Zheng 89bb66224SPengxuan Zheng; RWPI: ldr {{r[0-9]+}}, .LCPI0_0 99bb66224SPengxuan Zheng; RWPI: .LCPI0_0: 109bb66224SPengxuan Zheng; RWPI-NEXT: .long __stack_chk_guard(sbrel) 119bb66224SPengxuan Zheng 129bb66224SPengxuan Zheng; ROPI: ldr {{r[0-9]+}}, .LCPI0_0 139bb66224SPengxuan Zheng; ROPI: .LCPI0_0: 149bb66224SPengxuan Zheng; ROPI-NEXT: .long __stack_chk_guard 159bb66224SPengxuan Zheng 169bb66224SPengxuan Zheng; PIC: ldr {{r[0-9]+}}, .LCPI0_0 179bb66224SPengxuan Zheng; PIC: .LCPI0_0: 189bb66224SPengxuan Zheng; PIC-NEXT: .Ltmp0: 199bb66224SPengxuan Zheng; PIC-NEXT: .long __stack_chk_guard(GOT_PREL)-((.LPC0_0+8)-.Ltmp0) 209bb66224SPengxuan Zheng 219bb66224SPengxuan Zhengdefine dso_local i32 @foo(i32 %t) nounwind sspstrong { 229bb66224SPengxuan Zhengentry: 239bb66224SPengxuan Zheng %vla = alloca i32, i32 %t 24bed1c7f0SNikita Popov %call = call i32 @baz(ptr %vla) 259bb66224SPengxuan Zheng ret i32 %call 269bb66224SPengxuan Zheng} 279bb66224SPengxuan Zheng 28bed1c7f0SNikita Popovdeclare dso_local i32 @baz(ptr) 29*e018cbf7SFangrui Song 30*e018cbf7SFangrui Song!llvm.module.flags = !{!0} 31*e018cbf7SFangrui Song!0 = !{i32 7, !"PIC Level", i32 2} 32