• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2; RUN: opt -S -structurizecfg %s -o - | FileCheck %s
3
4define void @test(i1 %b1, i1 %b2, i1 %b3, i1 %b4) {
5; CHECK-LABEL: @test(
6; CHECK-NEXT:  A:
7; CHECK-NEXT:    [[B2_INV:%.*]] = xor i1 [[B2:%.*]], true
8; CHECK-NEXT:    br i1 [[B1:%.*]], label [[B:%.*]], label [[H:%.*]]
9; CHECK:       B:
10; CHECK-NEXT:    br label [[C:%.*]]
11; CHECK:       C:
12; CHECK-NEXT:    br i1 [[B2_INV]], label [[E:%.*]], label [[FLOW:%.*]]
13; CHECK:       Flow:
14; CHECK-NEXT:    [[TMP0:%.*]] = phi i1 [ [[B3:%.*]], [[E]] ], [ true, [[C]] ]
15; CHECK-NEXT:    [[TMP1:%.*]] = phi i1 [ false, [[E]] ], [ true, [[C]] ]
16; CHECK-NEXT:    br i1 [[TMP0]], label [[FLOW1:%.*]], label [[C]]
17; CHECK:       Flow1:
18; CHECK-NEXT:    br i1 [[TMP1]], label [[D:%.*]], label [[F:%.*]]
19; CHECK:       D:
20; CHECK-NEXT:    br label [[F]]
21; CHECK:       E:
22; CHECK-NEXT:    br label [[FLOW]]
23; CHECK:       F:
24; CHECK-NEXT:    br label [[G:%.*]]
25; CHECK:       G:
26; CHECK-NEXT:    br i1 [[B4:%.*]], label [[FLOW2:%.*]], label [[B]]
27; CHECK:       Flow2:
28; CHECK-NEXT:    br label [[H]]
29; CHECK:       H:
30; CHECK-NEXT:    ret void
31;
32A:
33  br i1 %b1, label %B, label %H
34
35B:
36  br label %C
37
38C:
39  br i1 %b2, label %D, label %E
40
41D:
42  br label %F
43
44E:
45  br i1 %b3, label %F, label %C
46
47F:
48  br label %G
49
50G:
51  br i1 %b4, label %H, label %B
52
53H:
54  ret void
55}
56