diff options
| author | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2019-07-17 20:46:16 +0000 |
|---|---|---|
| committer | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2019-07-17 20:46:16 +0000 |
| commit | 39fc2843e4eb07370d55f0a7a0db34d4bd6c9d5f (patch) | |
| tree | 3d5627d1cd1f549296ce399b71f08c236e2fbf66 /llvm/test/CodeGen/ARM/stack-guard-reassign.ll | |
| parent | 90ba54bf67c4c134d000b064121789a32c0c6a73 (diff) | |
| download | bcm5719-llvm-39fc2843e4eb07370d55f0a7a0db34d4bd6c9d5f.tar.gz bcm5719-llvm-39fc2843e4eb07370d55f0a7a0db34d4bd6c9d5f.zip | |
[CodeGen] Add stack protector tests where the guard gets re-assigned
In preparation of a fix, add tests for multiple backends.
llvm-svn: 366370
Diffstat (limited to 'llvm/test/CodeGen/ARM/stack-guard-reassign.ll')
| -rw-r--r-- | llvm/test/CodeGen/ARM/stack-guard-reassign.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/stack-guard-reassign.ll b/llvm/test/CodeGen/ARM/stack-guard-reassign.ll new file mode 100644 index 00000000000..ae3d91361e2 --- /dev/null +++ b/llvm/test/CodeGen/ARM/stack-guard-reassign.ll @@ -0,0 +1,14 @@ +; RUN: llc -O0 --frame-pointer=none -mtriple=arm-- -o - %S/../Inputs/stack-guard-reassign.ll | FileCheck %s + +; Verify that the offset assigned to the stack protector is at the top of the +; frame, covering the locals. +; CHECK-LABEL: fn: +; CHECK: sub sp, sp, #40 +; CHECK-NEXT: sub sp, sp, #65536 +; CHECK-NEXT: add r1, sp, #28 +; CHECK-NEXT: ldr r2, .LCPI0_0 +; CHECK-NEXT: ldr r3, [r2] +; CHECK-NEXT: str r3, [r1] +; CHECK-NEXT: str r0, [sp, #32] +; CHECK: .LCPI0_0: +; CHECK-NEXT: .long __stack_chk_guard |

