1; RUN: not opt -S < %s -verify 2>&1 | FileCheck %s
2
3; CHECK: gc.statepoint: number of deoptimization arguments must be a constant integer
4
5declare void @use(...)
6declare i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(i32, i32, i32)
7declare i64 addrspace(1)* @llvm.experimental.gc.relocate.p1i64(i32, i32, i32)
8declare i32 @llvm.experimental.gc.statepoint.p0f_isVoidf(void ()*, i32, i32, ...)
9declare i32 @"personality_function"()
10
11;; Basic usage
12define i64 addrspace(1)* @test1(i8 addrspace(1)* %arg, i32 %val) gc "statepoint-example" {
13entry:
14  %cast = bitcast i8 addrspace(1)* %arg to i64 addrspace(1)*
15  %safepoint_token = call i32 (void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(void ()* undef, i32 0, i32 0, i32 %val, i32 0, i32 0, i32 0, i32 10, i32 0, i8 addrspace(1)* %arg, i64 addrspace(1)* %cast, i8 addrspace(1)* %arg, i8 addrspace(1)* %arg)
16  %reloc = call i64 addrspace(1)* @llvm.experimental.gc.relocate.p1i64(i32 %safepoint_token, i32 9, i32 10)
17  ret i64 addrspace(1)* %reloc
18}
19
20