source: icGREP/icgrep-devel/llvm-3.8.0.src/test/CodeGen/AArch64/returnaddr.ll @ 5027

Last change on this file since 5027 was 5027, checked in by cameron, 3 years ago

Upgrade to llvm 3.8

File size: 505 bytes
Line 
1; RUN: llc -o - %s -mtriple=arm64-apple-ios7.0 | FileCheck %s
2
3define i8* @rt0(i32 %x) nounwind readnone {
4entry:
5; CHECK-LABEL: rt0:
6; CHECK: mov x0, x30
7  %0 = tail call i8* @llvm.returnaddress(i32 0)
8  ret i8* %0
9}
10
11define i8* @rt2() nounwind readnone {
12entry:
13; CHECK-LABEL: rt2:
14; CHECK: ldr x[[reg:[0-9]+]], [x29]
15; CHECK: ldr x[[reg]], [x[[reg]]]
16; CHECK: ldr x0, [x[[reg]], #8]
17  %0 = tail call i8* @llvm.returnaddress(i32 2)
18  ret i8* %0
19}
20
21declare i8* @llvm.returnaddress(i32) nounwind readnone
Note: See TracBrowser for help on using the repository browser.