1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -passes=loop-unroll -unroll-verify-domtree -verify-dom-info -S %s | FileCheck %s
7 ; CHECK-NEXT: br label [[LOOP_HEADER:%.*]]
9 ; CHECK-NEXT: br label [[LOOP_LATCH:%.*]]
11 ; CHECK-NEXT: br i1 true, label [[LOOP_HEADER_1:%.*]], label [[LOOP_EXIT:%.*]]
12 ; CHECK: loop.header.1:
13 ; CHECK-NEXT: br i1 true, label [[EXIT_LOOPEXIT:%.*]], label [[LOOP_LATCH_1:%.*]]
14 ; CHECK: loop.latch.1:
15 ; CHECK-NEXT: br label [[LOOP_EXIT]]
17 ; CHECK-NEXT: br label [[EXIT:%.*]]
18 ; CHECK: exit.loopexit:
19 ; CHECK-NEXT: br label [[EXIT]]
21 ; CHECK-NEXT: ret void
27 %exitcond = phi i1 [ true, %loop.latch ], [ false, %entry ]
28 br i1 %exitcond, label %exit, label %loop.latch
31 br i1 true, label %loop.header, label %loop.exit
40 define void @exiting_terminator_is_switch() {
41 ; CHECK-LABEL: @exiting_terminator_is_switch(
43 ; CHECK-NEXT: br label [[LOOP:%.*]]
45 ; CHECK-NEXT: switch i1 true, label [[LOOP_BACKEDGE:%.*]] [
46 ; CHECK-NEXT: i1 true, label [[EXIT:%.*]]
47 ; CHECK-NEXT: i1 false, label [[LOOP_BACKEDGE]]
49 ; CHECK: loop.backedge:
50 ; CHECK-NEXT: unreachable
52 ; CHECK-NEXT: ret void
58 switch i1 true, label %loop [