1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -rewrite-statepoints-for-gc < %s | FileCheck %s
4 target triple = "x86_64-unknown-linux-gnu"
5 target datalayout = "e-ni:1:6"
9 define i8 addrspace(1)* @test(i64 %i) gc "statepoint-example" {
11 ; CHECK-NEXT: [[P:%.*]] = inttoptr i64 [[I:%.*]] to i8 addrspace(1)*
12 ; CHECK-NEXT: [[STATEPOINT_TOKEN:%.*]] = call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 2882400000, i32 0, void ()* @foo, i32 0, i32 0, i32 0, i32 0) [ "gc-live"(i8 addrspace(1)* [[P]]) ]
13 ; CHECK-NEXT: [[P_RELOCATED:%.*]] = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token [[STATEPOINT_TOKEN]], i32 0, i32 0)
14 ; CHECK-NEXT: ret i8 addrspace(1)* [[P_RELOCATED]]
16 %p = inttoptr i64 %i to i8 addrspace(1)*
18 ret i8 addrspace(1)* %p