• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt -loop-simplify -S < %s | FileCheck %s
2
3; LoopSimplify shouldn't split loop backedges that use indirectbr.
4
5; CHECK: bb1:                                              ; preds = %bb5, %bb
6; CHECK-NEXT: indirectbr
7
8; CHECK: bb5:                                              ; preds = %bb1
9; CHECK-NEXT: br label %bb1{{$}}
10
11define void @foo(i8* %p) nounwind {
12bb:
13  br label %bb1
14
15bb1:                                              ; preds = %bb5, %bb1, %bb
16  indirectbr i8* %p, [label %bb6, label %bb7, label %bb1, label %bb2, label %bb3, label %bb5, label %bb4]
17
18bb2:                                              ; preds = %bb1
19  ret void
20
21bb3:                                              ; preds = %bb1
22  ret void
23
24bb4:                                              ; preds = %bb1
25  ret void
26
27bb5:                                              ; preds = %bb1
28  br label %bb1
29
30bb6:                                              ; preds = %bb1
31  ret void
32
33bb7:                                              ; preds = %bb1
34  ret void
35}
36