1; RUN: opt < %s -gvn-hoist -S | FileCheck %s
2
3define void @func() {
4; CHECK-LABEL: @func()
5; CHECK:       bb6:
6; CHECK:         store i64 0, i64* undef, align 8
7; CHECK:       bb7:
8; CHECK-NOT:     store i64 0, i64* undef, align 8
9; CHECK:       bb8:
10; CHECK-NOT:     store i64 0, i64* undef, align 8
11
12entry:
13  br label %bb1
14
15bb1:
16  br label %bb2
17
18bb2:
19  br label %bb3
20
21bb3:
22  br i1 undef, label %bb4, label %bb2
23
24bb4:
25  br i1 undef, label %bb5, label %bb3
26
27bb5:
28  br label %bb6
29
30bb6:
31  br i1 undef, label %bb7, label %bb8
32
33bb7:
34  store i64 0, i64* undef, align 8
35  unreachable
36
37bb8:
38  store i64 0, i64* undef, align 8
39  ret void
40}
41