summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/SafeStack/ARM/abi.ll
blob: e33c913ae9169f0dd6312470312e1f803ff05526 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
; RUN: opt -safe-stack -S -mtriple=arm-linux-android < %s -o - | FileCheck %s


define void @foo() nounwind uwtable safestack {
entry:
; CHECK: %[[SPA:.*]] = call i8** @__safestack_pointer_address()
; CHECK: %[[USP:.*]] = load i8*, i8** %[[SPA]]
; CHECK: %[[USST:.*]] = getelementptr i8, i8* %[[USP]], i32 -16
; CHECK: store i8* %[[USST]], i8** %[[SPA]]

  %a = alloca i8, align 8
  call void @Capture(i8* %a)

; CHECK: store i8* %[[USP]], i8** %[[SPA]]
  ret void
}

declare void @Capture(i8*)
OpenPOWER on IntegriCloud