1 ; RUN: not llvm-as < %s -o /dev/null 2>&1 | FileCheck %s
3 define i32 @f1(i32 %x) {
7 ; CHECK: Instruction does not dominate all uses!
8 ; CHECK-NEXT: %z = add i32 %x, 1
9 ; CHECK-NEXT: %y = add i32 %z, 1
13 define void @f2(i32 %x) personality i32 ()* @g {
15 %y1 = invoke i32 @g() to label %bb1 unwind label %bb2
19 %y2 = phi i32 [%y1, %bb0]
23 ; CHECK: Instruction does not dominate all uses!
24 ; CHECK-NEXT: %y1 = invoke i32 @g()
25 ; CHECK-NEXT: to label %bb1 unwind label %bb2
26 ; CHECK-NEXT: %y2 = phi i32 [ %y1, %bb0 ]
29 define void @f3(i32 %x) personality i32 ()* @g {
31 %y1 = invoke i32 @g() to label %bb1 unwind label %bb2
39 %y3 = phi i32 [%y1, %bb2]
41 ; CHECK: Instruction does not dominate all uses!
42 ; CHECK-NEXT: %y1 = invoke i32 @g()
43 ; CHECK-NEXT: to label %bb1 unwind label %bb2
44 ; CHECK-NEXT: %y3 = phi i32 [ %y1, %bb2 ]
47 define void @f4(i32 %x) {
51 %y3 = phi i32 [%y1, %bb0]
54 ; CHECK: Instruction does not dominate all uses!
55 ; CHECK-NEXT: %y1 = add i32 %x, 1
56 ; CHECK-NEXT: %y3 = phi i32 [ %y1, %bb0 ]