mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Test for 241794 (nest attribute in AArch64)
Forgot to git add the test. Patch by Stephen Cross. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241797 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
86b4ed2fc4
commit
b2d2f28221
23
test/CodeGen/AArch64/nest-register.ll
Normal file
23
test/CodeGen/AArch64/nest-register.ll
Normal file
@ -0,0 +1,23 @@
|
||||
; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu | FileCheck %s
|
||||
|
||||
; Tests that the 'nest' parameter attribute causes the relevant parameter to be
|
||||
; passed in the right register.
|
||||
|
||||
define i8* @nest_receiver(i8* nest %arg) nounwind {
|
||||
; CHECK-LABEL: nest_receiver:
|
||||
; CHECK-NEXT: // BB#0:
|
||||
; CHECK-NEXT: mov x0, x18
|
||||
; CHECK-NEXT: ret
|
||||
|
||||
ret i8* %arg
|
||||
}
|
||||
|
||||
define i8* @nest_caller(i8* %arg) nounwind {
|
||||
; CHECK-LABEL: nest_caller:
|
||||
; CHECK: mov x18, x0
|
||||
; CHECK-NEXT: bl nest_receiver
|
||||
; CHECK: ret
|
||||
|
||||
%result = call i8* @nest_receiver(i8* nest %arg)
|
||||
ret i8* %result
|
||||
}
|
Loading…
Reference in New Issue
Block a user