1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 < %s | FileCheck %s
10 define void @wombat(i64 %arg, i1 %arg1) {
11 ; CHECK-LABEL: @wombat(
13 ; CHECK-NEXT: [[COND:%.*]] = icmp eq i64 [[ARG:%.*]], 0
14 ; CHECK-NEXT: br i1 [[COND]], label [[BB4:%.*]], label [[BB2:%.*]]
16 ; CHECK-NEXT: call void @widget()
17 ; CHECK-NEXT: br label [[BB4]]
19 ; CHECK-NEXT: [[TMP:%.*]] = phi i8 [ 0, [[BB:%.*]] ], [ 1, [[BB2]] ]
20 ; CHECK-NEXT: call void @baz(i8 [[TMP]])
21 ; CHECK-NEXT: call void @snork()
22 ; CHECK-NEXT: call void @spam(i8 4)
23 ; CHECK-NEXT: ret void
26 switch i64 %arg, label %bb2 [
34 bb3: ; preds = %bb2, %bb
35 %tmp = phi i8 [ 0, %bb ], [ 1, %bb2 ]
39 call void @baz(i8 %tmp)
40 %tmp5 = select i1 %arg1, i64 6, i64 3
41 switch i64 %tmp5, label %bb7 [
54 bb8: ; preds = %bb7, %bb6, %bb4
55 %tmp9 = phi i8 [ 2, %bb4 ], [ 3, %bb6 ], [ 4, %bb7 ]
56 call void @spam(i8 %tmp9)