• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt -safe-stack -S -mtriple=arm-linux-android < %s -o - | FileCheck %s
2
3
4define void @foo() nounwind uwtable safestack {
5entry:
6; CHECK: %[[SPA:.*]] = call i8** @__safestack_pointer_address()
7; CHECK: %[[USP:.*]] = load i8*, i8** %[[SPA]]
8; CHECK: %[[USST:.*]] = getelementptr i8, i8* %[[USP]], i32 -16
9; CHECK: store i8* %[[USST]], i8** %[[SPA]]
10
11  %a = alloca i8, align 8
12  call void @Capture(i8* %a)
13
14; CHECK: store i8* %[[USP]], i8** %[[SPA]]
15  ret void
16}
17
18declare void @Capture(i8*)
19