llvm.org GIT mirror llvm / c2f33f2
gvn should never crash on this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60987 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 10 years ago
1 changed file(s) with 35 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: llvm-as < %s | opt -gvn | llvm-dis
1 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
2 target triple = "i386-apple-darwin7"
3
4 define i32 @main(i32 %argc, i8** %argv) nounwind {
5 entry:
6 br label %bb84
7
8 bb41: ; preds = %bb82
9 %tmp = load i8* %opt.0, align 1 ; [#uses=0]
10 %tmp1 = getelementptr i8* %opt.0, i32 1 ; [#uses=2]
11 switch i32 0, label %bb81 [
12 i32 102, label %bb82
13 i32 110, label %bb79
14 i32 118, label %bb80
15 ]
16
17 bb79: ; preds = %bb41
18 br label %bb82
19
20 bb80: ; preds = %bb41
21 ret i32 0
22
23 bb81: ; preds = %bb41
24 ret i32 1
25
26 bb82: ; preds = %bb84, %bb79, %bb41
27 %opt.0 = phi i8* [ %tmp3, %bb84 ], [ %tmp1, %bb79 ], [ %tmp1, %bb41 ] ; [#uses=3]
28 %tmp2 = load i8* %opt.0, align 1 ; [#uses=0]
29 br i1 false, label %bb84, label %bb41
30
31 bb84: ; preds = %bb82, %entry
32 %tmp3 = getelementptr i8* null, i32 1 ; [#uses=1]
33 br label %bb82
34 }