1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
3 ;; Testing that x18 is not clobbered when passing pointers with the nest
4 ;; attribute on windows
6 ; RUN: llc < %s -mtriple=aarch64-pc-windows-msvc | FileCheck %s --check-prefixes=CHECK,CHECK-NO-X18
7 ; RUN: llc < %s -mtriple=aarch64-linux-gnu | FileCheck %s --check-prefixes=CHECK,CHECK-X18
9 define dso_local i64 @other(ptr nest %p) #0 {
11 ; CHECK-X18: ldr x0, [x18]
12 ; CHECK-NO-X18: ldr x0, [x0]
18 define dso_local void @func() #0 {
25 ; CHECK: stp x30, x8, [sp, #-16]
26 ; CHECK-X18: add x18, sp, #8
28 ; CHECK-NO-X18: add x0, sp, #8
30 call void @other(ptr nest %p)
31 ; CHECK: ldr x30, [sp], #16
36 attributes #0 = { nounwind }