1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -o - -structurizecfg < %s | FileCheck %s
7 ; CHECK-NEXT: br label [[LOOP:%.*]]
9 ; CHECK-NEXT: br label [[FLOW1:%.*]]
11 ; CHECK-NEXT: [[CTR:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[CTR_NEXT:%.*]], [[FLOW1]] ]
12 ; CHECK-NEXT: [[CTR_NEXT]] = add i32 [[CTR]], 1
13 ; CHECK-NEXT: br i1 undef, label [[LOOP_A:%.*]], label [[FLOW1]]
15 ; CHECK-NEXT: br i1 undef, label [[LOOP_B:%.*]], label [[FLOW:%.*]]
17 ; CHECK-NEXT: br label [[FLOW]]
19 ; CHECK-NEXT: [[TMP0:%.*]] = phi i1 [ false, [[FLOW]] ], [ true, [[LOOP]] ]
20 ; CHECK-NEXT: br i1 [[TMP0]], label [[EXIT:%.*]], label [[LOOP]]
22 ; CHECK-NEXT: ret void
28 %ctr = phi i32 [ 0, %entry ], [ %ctr.next, %loop.a ], [ %ctr.next, %loop.b ]
29 %ctr.next = add i32 %ctr, 1
30 br i1 undef, label %exit, label %loop.a
33 br i1 undef, label %loop, label %loop.b