1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2 ; RUN: llc -mtriple aarch64-windows -filetype asm -o - < %s | FileCheck %s
3 ; RUN: llc -mtriple aarch64-windows -filetype asm -o - -fast-isel %s | FileCheck %s --check-prefix=FISEL
4 ; RUN: llc -mtriple aarch64-windows -filetype asm -o - -global-isel -global-isel-abort=0 %s | FileCheck %s
6 define void @func() nounwind {
9 ; CHECK-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
10 ; CHECK-NEXT: adrp x8, .refptr.weakfunc
11 ; CHECK-NEXT: ldr x8, [x8, :lo12:.refptr.weakfunc]
12 ; CHECK-NEXT: cbz x8, .LBB0_2
13 ; CHECK-NEXT: // %bb.1:
15 ; CHECK-NEXT: .LBB0_2:
16 ; CHECK-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
21 ; FISEL-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
22 ; FISEL-NEXT: adrp x8, .refptr.weakfunc
23 ; FISEL-NEXT: ldr x8, [x8, :lo12:.refptr.weakfunc]
24 ; FISEL-NEXT: cbz x8, .LBB0_2
25 ; FISEL-NEXT: // %bb.1:
26 ; FISEL-NEXT: adrp x8, .refptr.weakfunc
27 ; FISEL-NEXT: ldr x8, [x8, :lo12:.refptr.weakfunc]
29 ; FISEL-NEXT: .LBB0_2:
30 ; FISEL-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
32 %cmp = icmp ne ptr @weakfunc, null
33 br i1 %cmp, label %1, label %2
43 declare extern_weak void @weakfunc()