1 ; RUN: opt -safe-stack -S -mtriple=arm-linux-android < %s -o - | FileCheck %s
2 ; RUN: opt -passes=safe-stack -S -mtriple=arm-linux-android < %s -o - | FileCheck %s
5 define void @foo() nounwind uwtable safestack {
7 ; CHECK: %[[SPA:.*]] = call ptr @__safestack_pointer_address()
8 ; CHECK: %[[USP:.*]] = load ptr, ptr %[[SPA]]
9 ; CHECK: %[[USST:.*]] = getelementptr i8, ptr %[[USP]], i32 -16
10 ; CHECK: store ptr %[[USST]], ptr %[[SPA]]
12 %a = alloca i8, align 8
13 call void @Capture(ptr %a)
15 ; CHECK: store ptr %[[USP]], ptr %[[SPA]]
19 declare void @Capture(ptr)