1; Test target-specific stack cookie location.
2; RUN: llc -mtriple=aarch64-linux-android < %s -o - | FileCheck --check-prefix=ANDROID-AARCH64 %s
3
4define void @_Z1fv() sspreq {
5entry:
6  %x = alloca i32, align 4
7  %0 = bitcast i32* %x to i8*
8  call void @_Z7CapturePi(i32* nonnull %x)
9  ret void
10}
11
12declare void @_Z7CapturePi(i32*)
13
14; ANDROID-AARCH64: mrs [[A:.*]], TPIDR_EL0
15; ANDROID-AARCH64: ldr [[B:.*]], {{\[}}[[A]], #40]
16; ANDROID-AARCH64: str [[B]], [sp,
17; ANDROID-AARCH64: ldr [[C:.*]], {{\[}}[[A]], #40]
18; ANDROID-AARCH64: ldr [[D:.*]], [sp,
19; ANDROID-AARCH64: cmp [[C]], [[D]]
20