1 ; RUN: not opt -verify < %s 2>&1 | FileCheck %s
3 ; Operand bundles uses are like regular uses, and need to be dominated
8 define void @f0(i32* %ptr) {
9 ; CHECK: Instruction does not dominate all uses!
10 ; CHECK-NEXT: %x = add i32 42, 1
11 ; CHECK-NEXT: call void @g() [ "foo"(i32 42, i64 100, i32 %x), "bar"(float 0.000000e+00, i64 100, i32 %l) ]
14 %l = load i32, i32* %ptr
15 call void @g() [ "foo"(i32 42, i64 100, i32 %x), "bar"(float 0.0, i64 100, i32 %l) ]
20 define void @f1(i32* %ptr) personality i8 3 {
21 ; CHECK: Instruction does not dominate all uses!
22 ; CHECK-NEXT: %x = add i32 42, 1
23 ; CHECK-NEXT: invoke void @g() [ "foo"(i32 42, i64 100, i32 %x), "bar"(float 0.000000e+00, i64 100, i32 %l) ]
26 %l = load i32, i32* %ptr
27 invoke void @g() [ "foo"(i32 42, i64 100, i32 %x), "bar"(float 0.0, i64 100, i32 %l) ] to label %normal unwind label %exception
30 %cleanup = landingpad i8 cleanup
38 define void @f_deopt(i32* %ptr) {
39 ; CHECK: Multiple deopt operand bundles
40 ; CHECK-NEXT: call void @g() [ "deopt"(i32 42, i64 100, i32 %x), "deopt"(float 0.000000e+00, i64 100, i32 %l) ]
41 ; CHECK-NOT: call void @g() [ "deopt"(i32 42, i64 120, i32 %x) ]
44 %l = load i32, i32* %ptr
45 call void @g() [ "deopt"(i32 42, i64 100, i32 %x), "deopt"(float 0.0, i64 100, i32 %l) ]
46 call void @g() [ "deopt"(i32 42, i64 120) ] ;; The verifier should not complain about this one
51 define void @f_gc_transition(i32* %ptr) {
52 ; CHECK: Multiple gc-transition operand bundles
53 ; CHECK-NEXT: call void @g() [ "gc-transition"(i32 42, i64 100, i32 %x), "gc-transition"(float 0.000000e+00, i64 100, i32 %l) ]
54 ; CHECK-NOT: call void @g() [ "gc-transition"(i32 42, i64 120, i32 %x) ]
57 %l = load i32, i32* %ptr
58 call void @g() [ "gc-transition"(i32 42, i64 100, i32 %x), "gc-transition"(float 0.0, i64 100, i32 %l) ]
59 call void @g() [ "gc-transition"(i32 42, i64 120) ] ;; The verifier should not complain about this one