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
8 define void @eggs(i1 %arg, i1 %arg16, %0* %arg17, %0* %arg18, %0* %arg19) {
11 ; CHECK-NEXT: br i1 [[ARG:%.*]], label [[BB20:%.*]], label [[BB21:%.*]]
13 ; CHECK-NEXT: call void @wombat()
14 ; CHECK-NEXT: unreachable
16 ; CHECK-NEXT: [[I:%.*]] = icmp eq %0* [[ARG17:%.*]], null
17 ; CHECK-NEXT: [[TMP0:%.*]] = xor i1 [[I]], true
18 ; CHECK-NEXT: call void @llvm.assume(i1 [[TMP0]])
19 ; CHECK-NEXT: call void @hoge()
20 ; CHECK-NEXT: [[TMP1:%.*]] = xor i1 [[ARG16:%.*]], true
21 ; CHECK-NEXT: call void @llvm.assume(i1 [[TMP1]])
22 ; CHECK-NEXT: [[I27:%.*]] = getelementptr inbounds [[TMP0]], %0* [[ARG19:%.*]], i64 0, i32 0
23 ; CHECK-NEXT: [[I28:%.*]] = load %1*, %1** [[I27]], align 8
24 ; CHECK-NEXT: call void @pluto.1(%1* [[I28]])
25 ; CHECK-NEXT: call void @pluto()
26 ; CHECK-NEXT: ret void
29 br i1 %arg, label %bb20, label %bb21
36 %i = icmp eq %0* %arg17, null
37 br i1 %i, label %bb24, label %bb22
41 br i1 %arg16, label %bb24, label %bb23
46 bb24: ; preds = %bb23, %bb22, %bb21, %bb20
47 %i25 = phi i1 [ false, %bb21 ], [ false, %bb20 ], [ false, %bb23 ], [ false, %bb22 ]
48 %i26 = phi %0* [ null, %bb21 ], [ null, %bb20 ], [ %arg19, %bb23 ], [ null, %bb22 ]
49 %i27 = getelementptr inbounds %0, %0* %i26, i64 0, i32 0
50 %i28 = load %1*, %1** %i27, align 8
51 call void @pluto.1(%1* %i28)
52 br i1 %i25, label %bb30, label %bb29
63 declare void @wombat()
67 declare void @pluto.1(%1*)