source: icGREP/icgrep-devel/llvm-3.8.0.src/test/CodeGen/ARM/nest-register.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: 568 bytes
Line 
1; RUN: llc -mtriple=arm-eabi %s -o - | FileCheck %s
2
3; Tests that the 'nest' parameter attribute causes the relevant parameter to be
4; passed in the right register.
5
6define i8* @nest_receiver(i8* nest %arg) nounwind {
7; CHECK-LABEL: nest_receiver:
8; CHECK: @ BB#0:
9; CHECK-NEXT: mov r0, r12
10; CHECK-NEXT: mov pc, lr
11        ret i8* %arg
12}
13
14define i8* @nest_caller(i8* %arg) nounwind {
15; CHECK-LABEL: nest_caller:
16; CHECK: mov r12, r0
17; CHECK-NEXT: bl nest_receiver
18; CHECK: mov pc, lr
19        %result = call i8* @nest_receiver(i8* nest %arg)
20        ret i8* %result
21}
Note: See TracBrowser for help on using the repository browser.