xref: /llvm-project/llvm/test/CodeGen/AArch64/GlobalISel/pr57349.ll (revision 2fdf963dafdf4cc31112e3881c8933c5d5b5451d)
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc -global-isel -global-isel-abort=2 -mtriple aarch64-unknown-unknown -verify-machineinstrs %s -o - | FileCheck %s
3
4define i32 @__init__() gc "statepoint-example" {
5; CHECK-LABEL: __init__:
6; CHECK:       // %bb.0:
7; CHECK-NEXT:    str x30, [sp, #-16]! // 8-byte Folded Spill
8; CHECK-NEXT:    .cfi_def_cfa_offset 16
9; CHECK-NEXT:    .cfi_offset w30, -16
10; CHECK-NEXT:    bl builtins.__init__
11; CHECK-NEXT:  .Ltmp0:
12; CHECK-NEXT:    ldr x30, [sp], #16 // 8-byte Folded Reload
13; CHECK-NEXT:    ret
14  %statepoint_token = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr elementtype(i32 ()) @builtins.__init__, i32 0, i32 0, i32 0, i32 0) [ "deopt"() ]
15  %ret = call i32 (token) @llvm.experimental.gc.result(token %statepoint_token)
16  ret i32 %ret
17}
18
19declare i32 @builtins.__init__()
20
21declare token @llvm.experimental.gc.statepoint.p0(i64 immarg, i32 immarg, ptr, i32 immarg, i32 immarg, ...)
22declare i32 @llvm.experimental.gc.result(token)
23