1; RUN: opt < %s -basicaa -gvn -S | FileCheck %s
2
3; CHECK-NOT: load
4; CHECK-NOT: phi
5
6define i8* @cat(i8* %s1, ...) nounwind {
7entry:
8  br i1 undef, label %bb, label %bb3
9
10bb:                                               ; preds = %entry
11  unreachable
12
13bb3:                                              ; preds = %entry
14  store i8* undef, i8** undef, align 4
15  br i1 undef, label %bb5, label %bb6
16
17bb5:                                              ; preds = %bb3
18  unreachable
19
20bb6:                                              ; preds = %bb3
21  br label %bb12
22
23bb8:                                              ; preds = %bb12
24  br i1 undef, label %bb9, label %bb10
25
26bb9:                                              ; preds = %bb8
27  %0 = load i8*, i8** undef, align 4                   ; <i8*> [#uses=0]
28  %1 = load i8*, i8** undef, align 4                   ; <i8*> [#uses=0]
29  br label %bb11
30
31bb10:                                             ; preds = %bb8
32  br label %bb11
33
34bb11:                                             ; preds = %bb10, %bb9
35  br label %bb12
36
37bb12:                                             ; preds = %bb11, %bb6
38  br i1 undef, label %bb8, label %bb13
39
40bb13:                                             ; preds = %bb12
41  ret i8* undef
42}
43