Follow up to d0858bffa11, add missing REQUIRES x86
[llvm-project.git] / llvm / test / Transforms / SimpleLoopUnswitch / callbr.ll
blob98bf3edc6b8d53deb7f216885f006573d125ff2b
1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -passes='simple-loop-unswitch<nontrivial>' %s -S | FileCheck %s
4 declare i1 @foo()
6 define i32 @mem_cgroup_node_nr_lru_pages(i1 %tree) {
7 ; CHECK-LABEL: @mem_cgroup_node_nr_lru_pages(
8 ; CHECK-NEXT:  entry:
9 ; CHECK-NEXT:    br i1 [[TREE:%.*]], label [[ENTRY_SPLIT_US:%.*]], label [[ENTRY_SPLIT:%.*]]
10 ; CHECK:       entry.split.us:
11 ; CHECK-NEXT:    br label [[FOR_COND_US:%.*]]
12 ; CHECK:       for.cond.us:
13 ; CHECK-NEXT:    br label [[IF_END8_US:%.*]]
14 ; CHECK:       if.end8.us:
15 ; CHECK-NEXT:    br label [[FOR_COND_US]]
16 ; CHECK:       entry.split:
17 ; CHECK-NEXT:    br label [[FOR_COND:%.*]]
18 ; CHECK:       for.cond:
19 ; CHECK-NEXT:    br label [[IF_ELSE:%.*]]
20 ; CHECK:       if.else:
21 ; CHECK-NEXT:    callbr void asm sideeffect ".pushsection __jump_table, \22aw\22 \0A\09.popsection \0A\09", "!i,~{dirflag},~{fpsr},~{flags}"()
22 ; CHECK-NEXT:    to label [[IF_END8:%.*]] [label %for.cond5.preheader]
23 ; CHECK:       for.cond5.preheader:
24 ; CHECK-NEXT:    br label [[FOR_COND5:%.*]]
25 ; CHECK:       for.cond5:
26 ; CHECK-NEXT:    [[CALL6:%.*]] = call i1 @foo()
27 ; CHECK-NEXT:    br i1 [[CALL6]], label [[IF_END8_LOOPEXIT:%.*]], label [[FOR_COND5]]
28 ; CHECK:       if.end8.loopexit:
29 ; CHECK-NEXT:    br label [[IF_END8]]
30 ; CHECK:       if.end8:
31 ; CHECK-NEXT:    br label [[FOR_COND]]
33 entry:
34   br label %for.cond
36 for.cond:                                         ; preds = %if.end8, %entry
37   br i1 %tree, label %if.end8, label %if.else
39 if.else:                                          ; preds = %for.cond
40   callbr void asm sideeffect ".pushsection __jump_table,  \22aw\22 \0A\09.popsection \0A\09", "!i,~{dirflag},~{fpsr},~{flags}"()
41   to label %if.end8 [label %for.cond5]
43 for.cond5:                                        ; preds = %if.else, %for.cond5
44   %call6 = call i1 @foo()
45   br i1 %call6, label %if.end8.loopexit, label %for.cond5
47 if.end8.loopexit:                                 ; preds = %for.cond5
48   br label %if.end8
50 if.end8:                                          ; preds = %if.end8.loopexit, %if.else, %for.cond
51   br label %for.cond