1 ; RUN: opt -safe-stack -safe-stack-coloring -S -mtriple=aarch64-linux-android < %s -o - | FileCheck %s
3 define void @foo() nounwind uwtable safestack {
5 ; CHECK: %[[TP:.*]] = call ptr @llvm.thread.pointer()
6 ; CHECK: %[[SPA0:.*]] = getelementptr i8, ptr %[[TP]], i32 72
7 ; CHECK: %[[USP:.*]] = load ptr, ptr %[[SPA0]]
8 ; CHECK: %[[USST:.*]] = getelementptr i8, ptr %[[USP]], i32 -16
9 ; CHECK: store ptr %[[USST]], ptr %[[SPA0]]
11 %a = alloca i8, align 8
18 call void @Capture(ptr %a)
22 declare void @Capture(ptr)