1 ; Compiler should not be broken with a dead user.
2 ; RUN: opt -sink -S < %s | FileCheck %s
6 ; CHECK-NEXT: %conv = sext i16 %p1 to i32
7 ; CHECK-NEXT: br i1 undef, label %bb.1, label %bb.3
9 ; CHECK: bb.1: ; preds = %bb.0
10 ; CHECK-NEXT: br label %bb.2
12 ; CHECK: bb.2: ; preds = %bb.2, %bb.1
13 ; CHECK-NEXT: %and.2 = and i32 undef, %conv
14 ; CHECK-NEXT: br label %bb.2
16 ; CHECK: bb.3: ; preds = %bb.3, %bb.0
17 ; CHECK-NEXT: %and.3 = and i32 undef, %conv
18 ; CHECK-NEXT: br label %bb.3
20 ; CHECK: dead: ; preds = %dead
21 ; CHECK-NEXT: %and.dead = and i32 undef, %conv
22 ; CHECK-NEXT: br label %dead
23 define void @test(i16 %p1) {
25 %conv = sext i16 %p1 to i32
26 br i1 undef, label %bb.1, label %bb.3
31 bb.2: ; preds = %bb.2, %bb.1
32 %and.2 = and i32 undef, %conv
35 bb.3: ; preds = %bb.3, %bb.0
36 %and.3 = and i32 undef, %conv
40 %and.dead = and i32 undef, %conv