xref: /llvm-project/llvm/test/CodeGen/RISCV/rv64-statepoint-call-lowering-x1.ll (revision 53003e36e9f4574d06c22611f61f68de32c89c6b)
1*53003e36SSacha Coppey; RUN: llc -mtriple riscv64 -verify-machineinstrs -stop-after=prologepilog < %s | FileCheck %s
2*53003e36SSacha Coppey
3*53003e36SSacha Coppey; Check that STATEPOINT instruction has an early clobber implicit def for LR.
4*53003e36SSacha Coppeytarget datalayout = "e-i64:64-f80:128-n8:16:32:64-S128"
5*53003e36SSacha Coppeytarget triple = "riscv64"
6*53003e36SSacha Coppey
7*53003e36SSacha Coppeydefine void @test() "frame-pointer"="all" gc "statepoint-example" {
8*53003e36SSacha Coppeyentry:
9*53003e36SSacha Coppey  %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*53003e36SSacha Coppey; CHECK: STATEPOINT 0, 0, 0, target-flags(riscv-call) @return_i1, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, csr_ilp32_lp64, implicit-def $x2, implicit-def dead early-clobber $x1
11*53003e36SSacha Coppey  ret void
12*53003e36SSacha Coppey}
13*53003e36SSacha Coppey
14*53003e36SSacha Coppey
15*53003e36SSacha Coppeydeclare void @return_i1()
16*53003e36SSacha Coppeydeclare token @llvm.experimental.gc.statepoint.p0(i64, i32, ptr, i32, i32, ...)
17