[AArch64] The shift right/left and insert immediate builtins expect 3
[oota-llvm.git] / test / CodeGen / AArch64 / frameaddr.ll
1 ; RUN: llc < %s -mtriple=aarch64-none-linux-gnu  | FileCheck %s
2
3 define i8* @t() nounwind {
4 entry:
5 ; CHECK-LABEL: t:
6 ; CHECK: mov x0, x29
7         %0 = call i8* @llvm.frameaddress(i32 0)
8         ret i8* %0
9 }
10
11 define i8* @t2() nounwind {
12 entry:
13 ; CHECK-LABEL: t2:
14 ; CHECK: ldr x[[reg:[0-9]+]], [x29]
15 ; CHECK: ldr x[[reg]], [x[[reg]]]
16         %0 = call i8* @llvm.frameaddress(i32 2)
17         ret i8* %0
18 }
19
20 declare i8* @llvm.frameaddress(i32) nounwind readnone