1 ; Make sure we don't end up in an infinite recursion in singleReachablePHIPath().
3 ; RUN: opt -newgvn -S %s | FileCheck %s
5 @c = external global i64, align 8
7 ; CHECK-LABEL: define void @tinkywinky() {
9 ; CHECK-NEXT: br i1 undef, label %l2, label %if.then
10 ; CHECK: if.then: ; preds = %entry
11 ; CHECK-NEXT: br label %for.body
12 ; CHECK: ph: ; preds = %back, %ontrue
13 ; CHECK-NEXT: br label %for.body
14 ; CHECK: for.body: ; preds = %ph, %if.then
15 ; CHECK-NEXT: br i1 undef, label %ontrue, label %onfalse
16 ; CHECK: onfalse: ; preds = %for.body
17 ; CHECK-NEXT: %patatino = load i64, i64* @c
18 ; CHECK-NEXT: ret void
19 ; CHECK: ontrue: ; preds = %for.body
20 ; CHECK-NEXT: %dipsy = load i64, i64* @c
21 ; CHECK-NEXT: br label %ph
22 ; CHECK: back: ; preds = %l2
23 ; CHECK-NEXT: store i8 undef, i8* null
24 ; CHECK-NEXT: br label %ph
25 ; CHECK: end: ; preds = %l2
26 ; CHECK-NEXT: ret void
27 ; CHECK: l2: ; preds = %entry
28 ; CHECK-NEXT: br i1 false, label %back, label %end
31 define void @tinkywinky() {
33 br i1 undef, label %l2, label %if.then
39 br i1 undef, label %ontrue, label %onfalse
41 %patatino = load i64, i64* @c
42 store i64 %patatino, i64* @c
45 %dipsy = load i64, i64* @c
46 store i64 %dipsy, i64* @c
53 br i1 false, label %back, label %end