2 ; RUN: opt < %s -anders-aa -instcombine -gvn -disable-output
3 %struct.FULL = type { i32, i32, [1000 x float*] }
5 define i32 @sgesl(%struct.FULL* %a, i32* %ipvt, float* %b, i32 %job) {
7 %a_addr = alloca %struct.FULL* ; <%struct.FULL**> [#uses=1]
8 %ipvt_addr = alloca i32* ; <i32**> [#uses=1]
9 %b_addr = alloca float* ; <float**> [#uses=1]
10 %job_addr = alloca i32 ; <i32*> [#uses=1]
11 %akk = alloca float* ; <float**> [#uses=2]
12 %k = alloca i32 ; <i32*> [#uses=1]
13 %l = alloca i32 ; <i32*> [#uses=1]
14 %n = alloca i32 ; <i32*> [#uses=1]
15 %nm1 = alloca i32 ; <i32*> [#uses=1]
16 %tmp5 = load i32* %job_addr, align 4 ; <i32> [#uses=1]
17 %tmp6 = icmp eq i32 %tmp5, 0 ; <i1> [#uses=1]
18 %tmp67 = zext i1 %tmp6 to i8 ; <i8> [#uses=1]
19 %toBool = icmp ne i8 %tmp67, 0 ; <i1> [#uses=1]
20 br i1 %toBool, label %cond_true, label %cond_next137
22 cond_true: ; preds = %entry
23 %tmp732 = load i32* %nm1, align 4 ; <i32> [#uses=1]
24 %tmp743 = icmp slt i32 0, %tmp732 ; <i1> [#uses=1]
25 %tmp74754 = zext i1 %tmp743 to i8 ; <i8> [#uses=1]
26 %toBool765 = icmp ne i8 %tmp74754, 0 ; <i1> [#uses=1]
27 br i1 %toBool765, label %bb, label %bb77
29 bb: ; preds = %cond_true
30 %tmp9 = load %struct.FULL** %a_addr, align 4 ; <%struct.FULL*> [#uses=1]
31 %tmp10 = getelementptr %struct.FULL* %tmp9, i32 0, i32 2 ; <[1000 x float*]*> [#uses=1]
32 %tmp11 = getelementptr [1000 x float*]* %tmp10, i32 0, i32 0 ; <float**> [#uses=1]
33 %tmp12 = load float** %tmp11, align 4 ; <float*> [#uses=1]
34 %tmp13 = load i32* %k, align 4 ; <i32> [#uses=1]
35 %tmp14 = getelementptr float* %tmp12, i32 %tmp13 ; <float*> [#uses=1]
36 store float* %tmp14, float** %akk, align 4
37 %tmp17 = load float** %b_addr, align 4 ; <float*> [#uses=0]
38 %tmp18 = load i32* %l, align 4 ; <i32> [#uses=0]
41 bb77: ; preds = %cond_true
44 cond_next137: ; preds = %entry
45 %tmp18922 = load i32* %n, align 4 ; <i32> [#uses=1]
46 %tmp19023 = icmp slt i32 0, %tmp18922 ; <i1> [#uses=1]
47 %tmp19019124 = zext i1 %tmp19023 to i8 ; <i8> [#uses=1]
48 %toBool19225 = icmp ne i8 %tmp19019124, 0 ; <i1> [#uses=1]
49 br i1 %toBool19225, label %bb138, label %bb193
51 bb138: ; preds = %cond_next137
52 store float* null, float** %akk, align 4
55 bb193: ; preds = %cond_next137
56 %tmp196 = load i32** %ipvt_addr, align 4 ; <i32*> [#uses=0]