1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -structurizecfg %s -o - | FileCheck %s
4 define void @test(i1 %b1, i1 %b2, i1 %b3, i1 %b4) {
7 ; CHECK-NEXT: [[B2_INV:%.*]] = xor i1 [[B2:%.*]], true
8 ; CHECK-NEXT: br i1 [[B1:%.*]], label [[B:%.*]], label [[H:%.*]]
10 ; CHECK-NEXT: br label [[C:%.*]]
12 ; CHECK-NEXT: br i1 [[B2_INV]], label [[E:%.*]], label [[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]]
18 ; CHECK-NEXT: br i1 [[TMP1]], label [[D:%.*]], label [[F:%.*]]
20 ; CHECK-NEXT: br label [[F]]
22 ; CHECK-NEXT: br label [[FLOW]]
24 ; CHECK-NEXT: br label [[G:%.*]]
26 ; CHECK-NEXT: br i1 [[B4:%.*]], label [[FLOW2:%.*]], label [[B]]
28 ; CHECK-NEXT: br label [[H]]
30 ; CHECK-NEXT: ret void
33 br i1 %b1, label %B, label %H
39 br i1 %b2, label %D, label %E
45 br i1 %b3, label %F, label %C
51 br i1 %b4, label %H, label %B