blob: 182704bd6541a0e7efeeefc52b2d158345bf070f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
; RUN: llc < %s -mtriple=aarch64-none-linux-gnu | FileCheck %s
define i8* @t() nounwind {
entry:
; CHECK-LABEL: t:
; CHECK: mov x0, x29
%0 = call i8* @llvm.frameaddress(i32 0)
ret i8* %0
}
define i8* @t2() nounwind {
entry:
; CHECK-LABEL: t2:
; CHECK: ldr x[[reg:[0-9]+]], [x29]
; CHECK: ldr x[[reg]], [x[[reg]]]
%0 = call i8* @llvm.frameaddress(i32 2)
ret i8* %0
}
declare i8* @llvm.frameaddress(i32) nounwind readnone
|