1 ; RUN: opt < %s -loop-simplify -lcssa -verify-loop-info -verify-dom-info -S \
2 ; RUN: | grep -F "indirectbr i8* %x, [label %L0, label %L1]" \
5 ; LoopSimplify should not try to transform loops when indirectbr is involved.
7 define void @entry(i8* %x) {
9 indirectbr i8* %x, [ label %L0, label %L1 ]
18 define void @backedge(i8* %x) {
26 indirectbr i8* %x, [ label %L0, label %L1 ]
29 define i64 @exit(i8* %x) {
34 %z = bitcast i64 0 to i64
35 indirectbr i8* %x, [ label %L0, label %L1 ]
44 define i64 @criticalexit(i8* %x, i1 %a) {
46 br i1 %a, label %L1, label %L2
49 %z = bitcast i64 0 to i64
50 indirectbr i8* %x, [ label %L0, label %L1 ]
56 %y = phi i64 [ %z, %L2 ], [ 1, %entry ]
60 define i64 @exit_backedge(i8* %x) {
65 %z = bitcast i64 0 to i64
66 indirectbr i8* %x, [ label %L0, label %L1 ]
72 define i64 @criticalexit_backedge(i8* %x, i1 %a) {
74 br i1 %a, label %L0, label %L1
77 %z = bitcast i64 0 to i64
78 indirectbr i8* %x, [ label %L0, label %L1 ]
81 %y = phi i64 [ %z, %L0 ], [ 1, %entry ]
85 define void @pr5502() nounwind {
90 br i1 undef, label %while.body, label %while.end
93 indirectbr i8* undef, [label %end_opcode, label %end_opcode]
96 br i1 false, label %end_opcode, label %while.cond