[rtsan] Add fork/execve interceptors (#117198)
[llvm-project.git] / llvm / test / Transforms / LoopSimplify / 2012-03-20-indirectbr.ll
blob022a302e986b5e81b9b10edd3fa571395a037fd1
1 ; RUN: opt < %s -passes=loop-simplify -S | FileCheck %s
3 ; Make sure the preheader exists.
4 ; CHECK: sw.bb103:
5 ; CHECK: indirectbr {{.*}}label %while.cond112
6 ; CHECK: while.cond112:
7 ; But the tail is not split.
8 ; CHECK: for.body:
9 ; CHECK: indirectbr {{.*}}label %while.cond112
10 define fastcc void @build_regex_nfa() nounwind uwtable ssp {
11 entry:
12   indirectbr ptr blockaddress(@build_regex_nfa, %while.cond), [label %while.cond]
14 while.cond:                                       ; preds = %if.then439, %entry
15   indirectbr ptr blockaddress(@build_regex_nfa, %sw.bb103), [label %do.body785, label %sw.bb103]
17 sw.bb103:                                         ; preds = %while.body
18   indirectbr ptr blockaddress(@build_regex_nfa, %while.cond112), [label %while.cond112]
20 while.cond112:                                    ; preds = %for.body, %for.cond.preheader, %sw.bb103
21   %pc.0 = phi i8 [ -1, %sw.bb103 ], [ 0, %for.body ], [ %pc.0, %for.cond.preheader ]
22   indirectbr ptr blockaddress(@build_regex_nfa, %Lsetdone), [label %sw.bb118, label %Lsetdone]
24 sw.bb118:                                         ; preds = %while.cond112
25   indirectbr ptr blockaddress(@build_regex_nfa, %for.cond.preheader), [label %Lerror.loopexit, label %for.cond.preheader]
27 for.cond.preheader:                               ; preds = %sw.bb118
28   indirectbr ptr blockaddress(@build_regex_nfa, %for.body), [label %while.cond112, label %for.body]
30 for.body:                                         ; preds = %for.body, %for.cond.preheader
31   indirectbr ptr blockaddress(@build_regex_nfa, %for.body), [label %while.cond112, label %for.body]
33 Lsetdone:                                         ; preds = %while.cond112
34   unreachable
36 do.body785:                                       ; preds = %while.cond, %while.body
37   ret void
39 Lerror.loopexit:                                  ; preds = %sw.bb118
40   unreachable