1 ; RUN: opt < %s -gvn -enable-load-pre -disable-output 2 3 %struct.VEC_rtx_base = type { i32, i32, [1 x %struct.rtx_def*] } 4 %struct.VEC_rtx_gc = type { %struct.VEC_rtx_base } 5 %struct.block_symbol = type { [3 x %struct.cgraph_rtl_info], %struct.object_block*, i64 } 6 %struct.cgraph_rtl_info = type { i32 } 7 %struct.object_block = type { %struct.section*, i32, i64, %struct.VEC_rtx_gc*, %struct.VEC_rtx_gc* } 8 %struct.rtvec_def = type { i32, [1 x %struct.rtx_def*] } 9 %struct.rtx_def = type { i16, i8, i8, %struct.u } 10 %struct.section = type { %struct.unnamed_section } 11 %struct.u = type { %struct.block_symbol } 12 %struct.unnamed_section = type { %struct.cgraph_rtl_info, void (i8*)*, i8*, %struct.section* } 13 14 declare %struct.rtvec_def* @gen_rtvec(i32, ...) 15 16 declare %struct.rtx_def* @plus_constant(%struct.rtx_def*, i64) 17 18 declare %struct.rtx_def* @gen_rtx_fmt_Ei(i32, i32, %struct.rtvec_def*, i32) 19 20 declare i32 @local_symbolic_operand(%struct.rtx_def*, i32) 21 22 define %struct.rtx_def* @legitimize_pic_address(%struct.rtx_def* %orig, %struct.rtx_def* %reg) nounwind { 23 entry: 24 %addr = alloca %struct.rtx_def* ; <%struct.rtx_def**> [#uses=5] 25 %iftmp.1532 = alloca %struct.rtx_def* ; <%struct.rtx_def**> [#uses=3] 26 store %struct.rtx_def* %orig, %struct.rtx_def** null 27 %0 = load %struct.rtx_def** null, align 4 ; <%struct.rtx_def*> [#uses=0] 28 br i1 false, label %bb96, label %bb59 29 30 bb59: ; preds = %entry 31 %1 = load %struct.rtx_def** %addr, align 4 ; <%struct.rtx_def*> [#uses=1] 32 %2 = call i32 @local_symbolic_operand(%struct.rtx_def* %1, i32 0) nounwind ; <i32> [#uses=0] 33 br i1 false, label %bb96, label %bb63 34 35 bb63: ; preds = %bb59 36 br i1 false, label %bb64, label %bb74 37 38 bb64: ; preds = %bb63 39 br i1 false, label %bb72, label %bb65 40 41 bb65: ; preds = %bb64 42 br label %bb72 43 44 bb72: ; preds = %bb65, %bb64 45 br label %bb74 46 47 bb74: ; preds = %bb72, %bb63 48 br i1 false, label %bb75, label %bb76 49 50 bb75: ; preds = %bb74 51 br label %bb76 52 53 bb76: ; preds = %bb75, %bb74 54 br i1 false, label %bb77, label %bb84 55 56 bb77: ; preds = %bb76 57 %3 = getelementptr [1 x %struct.cgraph_rtl_info]* null, i32 0, i32 0 ; <%struct.cgraph_rtl_info*> [#uses=0] 58 unreachable 59 60 bb84: ; preds = %bb76 61 br i1 false, label %bb85, label %bb86 62 63 bb85: ; preds = %bb84 64 br label %bb87 65 66 bb86: ; preds = %bb84 67 br label %bb87 68 69 bb87: ; preds = %bb86, %bb85 70 %4 = call %struct.rtx_def* @gen_rtx_fmt_Ei(i32 16, i32 0, %struct.rtvec_def* null, i32 1) nounwind ; <%struct.rtx_def*> [#uses=0] 71 br i1 false, label %bb89, label %bb90 72 73 bb89: ; preds = %bb87 74 br label %bb91 75 76 bb90: ; preds = %bb87 77 br label %bb91 78 79 bb91: ; preds = %bb90, %bb89 80 br i1 false, label %bb92, label %bb93 81 82 bb92: ; preds = %bb91 83 br label %bb94 84 85 bb93: ; preds = %bb91 86 br label %bb94 87 88 bb94: ; preds = %bb93, %bb92 89 unreachable 90 91 bb96: ; preds = %bb59, %entry 92 %5 = load %struct.rtx_def** %addr, align 4 ; <%struct.rtx_def*> [#uses=1] 93 %6 = getelementptr %struct.rtx_def* %5, i32 0, i32 0 ; <i16*> [#uses=1] 94 %7 = load i16* %6, align 2 ; <i16> [#uses=0] 95 br i1 false, label %bb147, label %bb97 96 97 bb97: ; preds = %bb96 98 %8 = load %struct.rtx_def** %addr, align 4 ; <%struct.rtx_def*> [#uses=0] 99 br i1 false, label %bb147, label %bb99 100 101 bb99: ; preds = %bb97 102 unreachable 103 104 bb147: ; preds = %bb97, %bb96 105 %9 = load %struct.rtx_def** %addr, align 4 ; <%struct.rtx_def*> [#uses=1] 106 %10 = getelementptr %struct.rtx_def* %9, i32 0, i32 0 ; <i16*> [#uses=1] 107 %11 = load i16* %10, align 2 ; <i16> [#uses=0] 108 br i1 false, label %bb164, label %bb148 109 110 bb148: ; preds = %bb147 111 br i1 false, label %bb164, label %bb149 112 113 bb149: ; preds = %bb148 114 br i1 false, label %bb150, label %bb152 115 116 bb150: ; preds = %bb149 117 unreachable 118 119 bb152: ; preds = %bb149 120 br label %bb164 121 122 bb164: ; preds = %bb152, %bb148, %bb147 123 %12 = getelementptr [1 x %struct.cgraph_rtl_info]* null, i32 0, i32 1 ; <%struct.cgraph_rtl_info*> [#uses=0] 124 br i1 false, label %bb165, label %bb166 125 126 bb165: ; preds = %bb164 127 br label %bb167 128 129 bb166: ; preds = %bb164 130 br label %bb167 131 132 bb167: ; preds = %bb166, %bb165 133 br i1 false, label %bb211, label %bb168 134 135 bb168: ; preds = %bb167 136 br i1 false, label %bb211, label %bb170 137 138 bb170: ; preds = %bb168 139 br i1 false, label %bb172, label %bb181 140 141 bb172: ; preds = %bb170 142 br i1 false, label %bb179, label %bb174 143 144 bb174: ; preds = %bb172 145 br i1 false, label %bb177, label %bb175 146 147 bb175: ; preds = %bb174 148 br i1 false, label %bb177, label %bb176 149 150 bb176: ; preds = %bb175 151 br label %bb178 152 153 bb177: ; preds = %bb175, %bb174 154 br label %bb178 155 156 bb178: ; preds = %bb177, %bb176 157 br label %bb180 158 159 bb179: ; preds = %bb172 160 br label %bb180 161 162 bb180: ; preds = %bb179, %bb178 163 br label %bb181 164 165 bb181: ; preds = %bb180, %bb170 166 %13 = call %struct.rtvec_def* (i32, ...)* @gen_rtvec(i32 1, %struct.rtx_def* null) nounwind ; <%struct.rtvec_def*> [#uses=0] 167 unreachable 168 169 bb211: ; preds = %bb168, %bb167 170 %14 = load %struct.rtx_def** %addr, align 4 ; <%struct.rtx_def*> [#uses=0] 171 %15 = getelementptr [1 x %struct.cgraph_rtl_info]* null, i32 0, i32 0 ; <%struct.cgraph_rtl_info*> [#uses=0] 172 store %struct.rtx_def* null, %struct.rtx_def** null, align 4 173 br i1 false, label %bb212, label %bb213 174 175 bb212: ; preds = %bb211 176 store %struct.rtx_def* null, %struct.rtx_def** %iftmp.1532, align 4 177 br label %bb214 178 179 bb213: ; preds = %bb211 180 store %struct.rtx_def* null, %struct.rtx_def** %iftmp.1532, align 4 181 br label %bb214 182 183 bb214: ; preds = %bb213, %bb212 184 %16 = bitcast %struct.block_symbol* null to [1 x %struct.cgraph_rtl_info]* ; <[1 x %struct.cgraph_rtl_info]*> [#uses=1] 185 %17 = getelementptr [1 x %struct.cgraph_rtl_info]* %16, i32 0, i32 1 ; <%struct.cgraph_rtl_info*> [#uses=0] 186 %18 = load %struct.rtx_def** %iftmp.1532, align 4 ; <%struct.rtx_def*> [#uses=0] 187 %19 = getelementptr %struct.rtx_def* null, i32 0, i32 3 ; <%struct.u*> [#uses=1] 188 %20 = getelementptr %struct.u* %19, i32 0, i32 0 ; <%struct.block_symbol*> [#uses=1] 189 %21 = bitcast %struct.block_symbol* %20 to [1 x i64]* ; <[1 x i64]*> [#uses=1] 190 %22 = getelementptr [1 x i64]* %21, i32 0, i32 0 ; <i64*> [#uses=0] 191 %23 = call %struct.rtx_def* @plus_constant(%struct.rtx_def* null, i64 0) nounwind ; <%struct.rtx_def*> [#uses=0] 192 unreachable 193 } 194