1 ; RUN: not opt -passes=verify < %s 2>&1 | FileCheck %s
3 declare i8 @llvm.experimental.deoptimize.i8(...)
4 declare void @llvm.experimental.deoptimize.isVoid(...)
5 declare cc40 void @llvm.experimental.deoptimize.double(...)
7 declare void @unknown()
9 define void @f_notail() {
11 call void(...) @llvm.experimental.deoptimize.isVoid(i32 0) [ "deopt"() ]
12 ; CHECK: calls to experimental_deoptimize must be followed by a return
17 define void @f_nodeopt() {
19 call void(...) @llvm.experimental.deoptimize.isVoid()
20 ; CHECK: experimental_deoptimize must have exactly one "deopt" operand bundle
24 define void @f_invoke() personality i8 3 {
26 invoke void(...) @llvm.experimental.deoptimize.isVoid(i32 0, float 0.0) to label %ok unwind label %not_ok
27 ; CHECK: experimental_deoptimize cannot be invoked
33 %0 = landingpad { ptr, i32 }
34 filter [0 x ptr] zeroinitializer
38 define i8 @f_incorrect_return() {
40 %val = call i8(...) @llvm.experimental.deoptimize.i8() [ "deopt"() ]
41 ; CHECK: calls to experimental_deoptimize must be followed by a return of the value computed by experimental_deoptimize
45 ; CHECK: All llvm.experimental.deoptimize declarations must have the same calling convention