xref: /llvm-project/llvm/test/CodeGen/AArch64/statepoint-call-lowering-lr.ll (revision 5ddce70ef0e5a641d7fea95e31fc5e2439cb98cb)
1; RUN: llc -mtriple aarch64-none-linux-gnu -verify-machineinstrs -stop-after=prologepilog < %s | FileCheck %s
2
3; Check that STATEPOINT instruction has an early clobber implicit def for LR.
4target datalayout = "e-i64:64-f80:128-n8:16:32:64-S128"
5target triple = "aarch64-unknown-linux-gnu"
6
7define void @test() "frame-pointer"="all" gc "statepoint-example" {
8entry:
9  %safepoint_token = tail call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(void ()) @return_i1, i32 0, i32 0, i32 0, i32 0) ["gc-live" ()]
10; CHECK: STATEPOINT 0, 0, 0, @return_i1, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, csr_aarch64_aapcs, implicit-def $sp, implicit-def dead early-clobber $lr
11  ret void
12}
13
14
15declare void @return_i1()
16declare token @llvm.experimental.gc.statepoint.p0(i64, i32, ptr, i32, i32, ...)
17