1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -fix-irreducible -S | FileCheck %s
4 define dso_local void @tre_tnfa_run_backtrack() {
5 ; CHECK-LABEL: @tre_tnfa_run_backtrack(
7 ; CHECK-NEXT: br label [[RETRY:%.*]]
9 ; CHECK-NEXT: br label [[IRR_GUARD:%.*]]
10 ; CHECK: while.body248:
11 ; CHECK-NEXT: br i1 undef, label [[IF_THEN250:%.*]], label [[IF_END275:%.*]]
13 ; CHECK-NEXT: br label [[FOR_COND264:%.*]]
15 ; CHECK-NEXT: br i1 undef, label [[FOR_BODY267:%.*]], label [[IRR_GUARD]]
17 ; CHECK-NEXT: br label [[FOR_COND264]]
19 ; CHECK-NEXT: br label [[FOR_COND342:%.*]]
21 ; CHECK-NEXT: br i1 undef, label [[FOR_BODY345:%.*]], label [[FOR_END580:%.*]]
23 ; CHECK-NEXT: br label [[FOR_COND342]]
25 ; CHECK-NEXT: br label [[IRR_GUARD]]
27 ; CHECK-NEXT: br i1 undef, label [[IF_THEN595:%.*]], label [[IF_ELSE629:%.*]]
29 ; CHECK-NEXT: br label [[FOR_COND616:%.*]]
31 ; CHECK-NEXT: br i1 undef, label [[FOR_BODY619:%.*]], label [[FOR_END626:%.*]]
33 ; CHECK-NEXT: br label [[FOR_COND616]]
35 ; CHECK-NEXT: br label [[IRR_GUARD]]
37 ; CHECK-NEXT: br label [[RETRY]]
39 ; CHECK-NEXT: [[GUARD_BACKTRACK:%.*]] = phi i1 [ true, [[FOR_END580]] ], [ true, [[FOR_COND264]] ], [ undef, [[RETRY]] ], [ false, [[FOR_END626]] ]
40 ; CHECK-NEXT: br i1 [[GUARD_BACKTRACK]], label [[BACKTRACK:%.*]], label [[WHILE_BODY248:%.*]]
46 br i1 undef, label %backtrack, label %while.body248
48 while.body248: ; preds = %for.end626, %retry
49 br i1 undef, label %if.then250, label %if.end275
51 if.then250: ; preds = %while.body248
54 for.cond264: ; preds = %for.body267, %if.then250
55 br i1 undef, label %for.body267, label %backtrack
57 for.body267: ; preds = %for.cond264
60 if.end275: ; preds = %while.body248
63 for.cond342: ; preds = %for.body345, %if.end275
64 br i1 undef, label %for.body345, label %for.end580
66 for.body345: ; preds = %for.cond342
69 for.end580: ; preds = %for.cond342
72 backtrack: ; preds = %for.end580, %for.cond264, %retry
73 br i1 undef, label %if.then595, label %if.else629
75 if.then595: ; preds = %backtrack
78 for.cond616: ; preds = %for.body619, %if.then595
79 br i1 undef, label %for.body619, label %for.end626
81 for.body619: ; preds = %for.cond616
84 for.end626: ; preds = %for.cond616
85 br label %while.body248
87 if.else629: ; preds = %backtrack