Home | History | Annotate | Download | only in Verifier
      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 
      5 declare void @use(...)
      6 declare i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token, i32, i32)
      7 declare i64 addrspace(1)* @llvm.experimental.gc.relocate.p1i64(token, i32, i32)
      8 declare token @llvm.experimental.gc.statepoint.p0f_isVoidf(i64, i32, void ()*, i32, i32, ...)
      9 declare i32 @"personality_function"()
     10 
     11 ;; Basic usage
     12 define i64 addrspace(1)* @test1(i8 addrspace(1)* %arg, i32 %val) gc "statepoint-example" {
     13 entry:
     14   %cast = bitcast i8 addrspace(1)* %arg to i64 addrspace(1)*
     15   %safepoint_token = call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 0, i32 0, void ()* undef, i32 0, 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(token %safepoint_token, i32 12, i32 13)
     17   ret i64 addrspace(1)* %reloc
     18 }
     19