1 ; RUN: llc < %s -mtriple=x86_64-unknown | FileCheck %s
3 define ptr addrspace(1) @no_extra_const(ptr addrspace(1) %obj) gc "statepoint-example" {
4 ; CHECK-LABEL: no_extra_const:
5 ; CHECK: .cfi_startproc
6 ; CHECK-NEXT: # %bb.0: # %entry
7 ; CHECK-NEXT: pushq %rax
8 ; CHECK-NEXT: .cfi_def_cfa_offset 16
9 ; CHECK-NEXT: movq %rdi, (%rsp)
10 ; CHECK-NEXT: nopl 8(%rax)
12 ; CHECK-NEXT: movq (%rsp), %rax
13 ; CHECK-NEXT: popq %rcx
14 ; CHECK-NEXT: .cfi_def_cfa_offset 8
17 %safepoint_token = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 4, ptr elementtype(void ()) null, i32 0, i32 0, i32 0, i32 0) ["gc-live" (ptr addrspace(1) %obj)]
18 %obj.relocated = call coldcc ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token %safepoint_token, i32 0, i32 0) ; (%obj, %obj)
19 ret ptr addrspace(1) %obj.relocated
22 declare token @llvm.experimental.gc.statepoint.p0(i64, i32, ptr, i32, i32, ...)
23 declare ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token, i32, i32)