1 ; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=basic-blocks --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
2 ; RUN: FileCheck %s < %t
5 ; Check that no invalid reduction is produced. Remaining unreachable
6 ; blocks can leave instructions that dominate uses. When %bb3 was made
7 ; unreachable it produced this verifier error:
8 ; Instruction does not dominate all uses!
9 ; %i4 = icmp eq i32 0, 0
10 ; %i6 = select i1 %i4, i1 false, i1 false
13 ; CHECK: define void @func() {
15 ; CHECK-NEXT: br label %bb1
18 ; CHECK-NEXT: label %bb3
21 ; CHECK-NEXT: br i1 false, label %bb1, label %bb2
24 ; CHECK-NEXT: %i = phi i32 [ 0, %bb1 ]
25 ; CHECK: %i4 = icmp eq i32 0, 0
26 ; CHECK-NEXT: br label %bb5
29 ; CHECK-NEXT: %i6 = select i1 %i4, i1 false, i1 false
30 ; CHECK-NEXT: store i32 0
31 ; CHECK-NEXT: ret void
36 bb1: ; preds = %bb2, %bb
40 br i1 false, label %bb1, label %bb2
43 %i = phi i32 [ 0, %bb1 ]
44 %i4 = icmp eq i32 0, 0
48 %i6 = select i1 %i4, i1 false, i1 false
49 ; CHECK-INTERESTINGNESS: store
50 store i32 0, ptr undef, align 4