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 i8* @llvm.thread.pointer()
6 ; CHECK: %[[SPA0:.*]] = getelementptr i8, i8* %[[TP]], i32 72
7 ; CHECK: %[[SPA:.*]] = bitcast i8* %[[SPA0]] to i8**
8 ; CHECK: %[[USP:.*]] = load i8*, i8** %[[SPA]]
9 ; CHECK: %[[USST:.*]] = getelementptr i8, i8* %[[USP]], i32 -16
10 ; CHECK: store i8* %[[USST]], i8** %[[SPA]]
12 %a = alloca i8, align 8
19 call void @Capture(i8* %a)
23 declare void @Capture(i8*)