[rtsan] Add fork/execve interceptors (#117198)
[llvm-project.git] / llvm / test / Transforms / LoopSimplify / indirectbr-backedge.ll
blob83be3de1a6beb2abe2aa6fd1591670d950535018
1 ; RUN: opt -passes=loop-simplify -S < %s | FileCheck %s
3 ; LoopSimplify shouldn't split loop backedges that use indirectbr.
5 ; CHECK: bb1:                                              ; preds = %bb5, %bb
6 ; CHECK-NEXT: indirectbr
8 ; CHECK: bb5:                                              ; preds = %bb1
9 ; CHECK-NEXT: br label %bb1{{$}}
11 define void @foo(ptr %p) nounwind {
12 bb:
13   br label %bb1
15 bb1:                                              ; preds = %bb5, %bb1, %bb
16   indirectbr ptr %p, [label %bb6, label %bb7, label %bb1, label %bb2, label %bb3, label %bb5, label %bb4]
18 bb2:                                              ; preds = %bb1
19   ret void
21 bb3:                                              ; preds = %bb1
22   ret void
24 bb4:                                              ; preds = %bb1
25   ret void
27 bb5:                                              ; preds = %bb1
28   br label %bb1
30 bb6:                                              ; preds = %bb1
31   ret void
33 bb7:                                              ; preds = %bb1
34   ret void