comparison test/Transforms/ScalarRepl/crash.ll @ 95:afa8332a0e37 LLVM3.8

LLVM 3.8
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Tue, 13 Oct 2015 17:48:58 +0900
parents 95c75e76d11b
children
comparison
equal deleted inserted replaced
84:f3e34b893a5f 95:afa8332a0e37
9 entry: 9 entry:
10 %l_72 = alloca i32*, align 8 10 %l_72 = alloca i32*, align 8
11 unreachable 11 unreachable
12 12
13 for.cond: ; preds = %for.cond 13 for.cond: ; preds = %for.cond
14 %tmp1.i = load i32** %l_72, align 8 14 %tmp1.i = load i32*, i32** %l_72, align 8
15 store i32* %tmp1.i, i32** %l_72, align 8 15 store i32* %tmp1.i, i32** %l_72, align 8
16 br label %for.cond 16 br label %for.cond
17 17
18 if.end: ; No predecessors! 18 if.end: ; No predecessors!
19 ret void 19 ret void
20 } 20 }
21 21
22 22
23 define void @test2() { 23 define void @test2() {
24 %E = alloca { { i32, float, double, i64 }, { i32, float, double, i64 } } ; <{ { i32, float, double, i64 }, { i32, float, double, i64 } }*> [#uses=1] 24 %E = alloca { { i32, float, double, i64 }, { i32, float, double, i64 } } ; <{ { i32, float, double, i64 }, { i32, float, double, i64 } }*> [#uses=1]
25 %tmp.151 = getelementptr { { i32, float, double, i64 }, { i32, float, double, i64 } }* %E, i64 0, i32 1, i32 3 ; <i64*> [#uses=0] 25 %tmp.151 = getelementptr { { i32, float, double, i64 }, { i32, float, double, i64 } }, { { i32, float, double, i64 }, { i32, float, double, i64 } }* %E, i64 0, i32 1, i32 3 ; <i64*> [#uses=0]
26 ret void 26 ret void
27 } 27 }
28 28
29 define i32 @test3() { 29 define i32 @test3() {
30 %X = alloca { [4 x i32] } ; <{ [4 x i32] }*> [#uses=1] 30 %X = alloca { [4 x i32] } ; <{ [4 x i32] }*> [#uses=1]
31 %Y = getelementptr { [4 x i32] }* %X, i64 0, i32 0, i64 2 ; <i32*> [#uses=2] 31 %Y = getelementptr { [4 x i32] }, { [4 x i32] }* %X, i64 0, i32 0, i64 2 ; <i32*> [#uses=2]
32 store i32 4, i32* %Y 32 store i32 4, i32* %Y
33 %Z = load i32* %Y ; <i32> [#uses=1] 33 %Z = load i32, i32* %Y ; <i32> [#uses=1]
34 ret i32 %Z 34 ret i32 %Z
35 } 35 }
36 36
37 37
38 %struct.rtx_def = type { [2 x i8], i32, [1 x %union.rtunion_def] } 38 %struct.rtx_def = type { [2 x i8], i32, [1 x %union.rtunion_def] }
100 ret void 100 ret void
101 bb9131: ; preds = %bb1365 101 bb9131: ; preds = %bb1365
102 ret void 102 ret void
103 bb9875: ; preds = %bb1365 103 bb9875: ; preds = %bb1365
104 %source_ptr9884 = bitcast i8** %source_ptr to i8** ; <i8**> [#uses=1] 104 %source_ptr9884 = bitcast i8** %source_ptr to i8** ; <i8**> [#uses=1]
105 %tmp9885 = load i8** %source_ptr9884 ; <i8*> [#uses=0] 105 %tmp9885 = load i8*, i8** %source_ptr9884 ; <i8*> [#uses=0]
106 ret void 106 ret void
107 bb10249: ; preds = %bb1365 107 bb10249: ; preds = %bb1365
108 %source_ptr10257 = bitcast i8** %source_ptr to i16** ; <i16**> [#uses=1] 108 %source_ptr10257 = bitcast i8** %source_ptr to i16** ; <i16**> [#uses=1]
109 %tmp10258 = load i16** %source_ptr10257 ; <i16*> [#uses=0] 109 %tmp10258 = load i16*, i16** %source_ptr10257 ; <i16*> [#uses=0]
110 ret void 110 ret void
111 cond_next10377: ; preds = %bb1365 111 cond_next10377: ; preds = %bb1365
112 ret void 112 ret void
113 bb27055: ; preds = %bb1357 113 bb27055: ; preds = %bb1357
114 ret void 114 ret void
123 define void @test6() { 123 define void @test6() {
124 entry: 124 entry:
125 %this_addr.i = alloca %"struct.__gnu_cxx::balloc::_Inclusive_between<__gnu_cxx::bitmap_allocator<char>::_Alloc_block*>"* ; <%"struct.__gnu_cxx::balloc::_Inclusive_between<__gnu_cxx::bitmap_allocator<char>::_Alloc_block*>"**> [#uses=3] 125 %this_addr.i = alloca %"struct.__gnu_cxx::balloc::_Inclusive_between<__gnu_cxx::bitmap_allocator<char>::_Alloc_block*>"* ; <%"struct.__gnu_cxx::balloc::_Inclusive_between<__gnu_cxx::bitmap_allocator<char>::_Alloc_block*>"**> [#uses=3]
126 %tmp = alloca %"struct.__gnu_cxx::balloc::_Inclusive_between<__gnu_cxx::bitmap_allocator<char>::_Alloc_block*>", align 4 ; <%"struct.__gnu_cxx::balloc::_Inclusive_between<__gnu_cxx::bitmap_allocator<char>::_Alloc_block*>"*> [#uses=1] 126 %tmp = alloca %"struct.__gnu_cxx::balloc::_Inclusive_between<__gnu_cxx::bitmap_allocator<char>::_Alloc_block*>", align 4 ; <%"struct.__gnu_cxx::balloc::_Inclusive_between<__gnu_cxx::bitmap_allocator<char>::_Alloc_block*>"*> [#uses=1]
127 store %"struct.__gnu_cxx::balloc::_Inclusive_between<__gnu_cxx::bitmap_allocator<char>::_Alloc_block*>"* %tmp, %"struct.__gnu_cxx::balloc::_Inclusive_between<__gnu_cxx::bitmap_allocator<char>::_Alloc_block*>"** %this_addr.i 127 store %"struct.__gnu_cxx::balloc::_Inclusive_between<__gnu_cxx::bitmap_allocator<char>::_Alloc_block*>"* %tmp, %"struct.__gnu_cxx::balloc::_Inclusive_between<__gnu_cxx::bitmap_allocator<char>::_Alloc_block*>"** %this_addr.i
128 %tmp.i = load %"struct.__gnu_cxx::balloc::_Inclusive_between<__gnu_cxx::bitmap_allocator<char>::_Alloc_block*>"** %this_addr.i ; <%"struct.__gnu_cxx::balloc::_Inclusive_between<__gnu_cxx::bitmap_allocator<char>::_Alloc_block*>"*> [#uses=1] 128 %tmp.i = load %"struct.__gnu_cxx::balloc::_Inclusive_between<__gnu_cxx::bitmap_allocator<char>::_Alloc_block*>"*, %"struct.__gnu_cxx::balloc::_Inclusive_between<__gnu_cxx::bitmap_allocator<char>::_Alloc_block*>"** %this_addr.i ; <%"struct.__gnu_cxx::balloc::_Inclusive_between<__gnu_cxx::bitmap_allocator<char>::_Alloc_block*>"*> [#uses=1]
129 %tmp.i.upgrd.1 = bitcast %"struct.__gnu_cxx::balloc::_Inclusive_between<__gnu_cxx::bitmap_allocator<char>::_Alloc_block*>"* %tmp.i to %"struct.__gnu_cxx::bitmap_allocator<char>"* ; <%"struct.__gnu_cxx::bitmap_allocator<char>"*> [#uses=0] 129 %tmp.i.upgrd.1 = bitcast %"struct.__gnu_cxx::balloc::_Inclusive_between<__gnu_cxx::bitmap_allocator<char>::_Alloc_block*>"* %tmp.i to %"struct.__gnu_cxx::bitmap_allocator<char>"* ; <%"struct.__gnu_cxx::bitmap_allocator<char>"*> [#uses=0]
130 %tmp1.i = load %"struct.__gnu_cxx::balloc::_Inclusive_between<__gnu_cxx::bitmap_allocator<char>::_Alloc_block*>"** %this_addr.i ; <%"struct.__gnu_cxx::balloc::_Inclusive_between<__gnu_cxx::bitmap_allocator<char>::_Alloc_block*>"*> [#uses=1] 130 %tmp1.i = load %"struct.__gnu_cxx::balloc::_Inclusive_between<__gnu_cxx::bitmap_allocator<char>::_Alloc_block*>"*, %"struct.__gnu_cxx::balloc::_Inclusive_between<__gnu_cxx::bitmap_allocator<char>::_Alloc_block*>"** %this_addr.i ; <%"struct.__gnu_cxx::balloc::_Inclusive_between<__gnu_cxx::bitmap_allocator<char>::_Alloc_block*>"*> [#uses=1]
131 %tmp.i.upgrd.2 = getelementptr %"struct.__gnu_cxx::balloc::_Inclusive_between<__gnu_cxx::bitmap_allocator<char>::_Alloc_block*>"* %tmp1.i, i32 0, i32 0 ; <%"struct.__gnu_cxx::bitmap_allocator<char>::_Alloc_block"**> [#uses=0] 131 %tmp.i.upgrd.2 = getelementptr %"struct.__gnu_cxx::balloc::_Inclusive_between<__gnu_cxx::bitmap_allocator<char>::_Alloc_block*>", %"struct.__gnu_cxx::balloc::_Inclusive_between<__gnu_cxx::bitmap_allocator<char>::_Alloc_block*>"* %tmp1.i, i32 0, i32 0 ; <%"struct.__gnu_cxx::bitmap_allocator<char>::_Alloc_block"**> [#uses=0]
132 unreachable 132 unreachable
133 } 133 }
134 134
135 %struct.CGPoint = type { float, float } 135 %struct.CGPoint = type { float, float }
136 %struct.aal_big_range_t = type { i32, i32 } %struct.aal_callback_t = type { i8* (i8*, i32)*, void (i8*, i8*)* } %struct.aal_edge_pool_t = type { %struct.aal_edge_pool_t*, i32, i32, [0 x %struct.aal_edge_t] } %struct.aal_edge_t = type { %struct.CGPoint, %struct.CGPoint, i32 } 136 %struct.aal_big_range_t = type { i32, i32 } %struct.aal_callback_t = type { i8* (i8*, i32)*, void (i8*, i8*)* } %struct.aal_edge_pool_t = type { %struct.aal_edge_pool_t*, i32, i32, [0 x %struct.aal_edge_t] } %struct.aal_edge_t = type { %struct.CGPoint, %struct.CGPoint, i32 }
159 %SB19 = bitcast %struct.aal_spanbucket_t* %SB to i8* ; <i8*> [#uses=1] 159 %SB19 = bitcast %struct.aal_spanbucket_t* %SB to i8* ; <i8*> [#uses=1]
160 call void @llvm.memcpy.p0i8.p0i8.i32(i8* %SB19, i8* null, i32 12, i32 0, i1 false) 160 call void @llvm.memcpy.p0i8.p0i8.i32(i8* %SB19, i8* null, i32 12, i32 0, i1 false)
161 br i1 false, label %cond_next34, label %cond_next79 161 br i1 false, label %cond_next34, label %cond_next79
162 162
163 cond_next34: ; preds = %cond_next 163 cond_next34: ; preds = %cond_next
164 %i.2.reload22 = load i32* null ; <i32> [#uses=1] 164 %i.2.reload22 = load i32, i32* null ; <i32> [#uses=1]
165 %tmp51 = getelementptr %struct.aal_spanbucket_t* %SB, i32 0, i32 2, i32 0, i32 0, i32 %i.2.reload22, i32 1 165 %tmp51 = getelementptr %struct.aal_spanbucket_t, %struct.aal_spanbucket_t* %SB, i32 0, i32 2, i32 0, i32 0, i32 %i.2.reload22, i32 1
166 ; <i16*> [#uses=0] 166 ; <i16*> [#uses=0]
167 ret void 167 ret void
168 168
169 cond_next79: ; preds = %cond_next, %entry 169 cond_next79: ; preds = %cond_next, %entry
170 ret void 170 ret void
178 178
179 ; PR3304 179 ; PR3304
180 define void @test8() { 180 define void @test8() {
181 entry: 181 entry:
182 %v = alloca %struct.c37304a__vrec 182 %v = alloca %struct.c37304a__vrec
183 %0 = getelementptr %struct.c37304a__vrec* %v, i32 0, i32 0 183 %0 = getelementptr %struct.c37304a__vrec, %struct.c37304a__vrec* %v, i32 0, i32 0
184 store i8 8, i8* %0, align 1 184 store i8 8, i8* %0, align 1
185 unreachable 185 unreachable
186 } 186 }
187 187
188 188
191 %0 = type <{ i32, i16, i8, i8, i64, i64, i16, [0 x i16] }> 191 %0 = type <{ i32, i16, i8, i8, i64, i64, i16, [0 x i16] }>
192 192
193 define i32 @test9() { 193 define i32 @test9() {
194 entry: 194 entry:
195 %.compoundliteral = alloca %0 195 %.compoundliteral = alloca %0
196 %tmp228 = getelementptr %0* %.compoundliteral, i32 0, i32 7 196 %tmp228 = getelementptr %0, %0* %.compoundliteral, i32 0, i32 7
197 %tmp229 = bitcast [0 x i16]* %tmp228 to i8* 197 %tmp229 = bitcast [0 x i16]* %tmp228 to i8*
198 call void @llvm.memset.p0i8.i64(i8* %tmp229, i8 0, i64 0, i32 2, i1 false) 198 call void @llvm.memset.p0i8.i64(i8* %tmp229, i8 0, i64 0, i32 2, i1 false)
199 unreachable 199 unreachable
200 } 200 }
201 201
205 ; PR4146 - i1 handling 205 ; PR4146 - i1 handling
206 %wrapper = type { i1 } 206 %wrapper = type { i1 }
207 define void @test10() { 207 define void @test10() {
208 entry: 208 entry:
209 %w = alloca %wrapper, align 8 ; <%wrapper*> [#uses=1] 209 %w = alloca %wrapper, align 8 ; <%wrapper*> [#uses=1]
210 %0 = getelementptr %wrapper* %w, i64 0, i32 0 ; <i1*> 210 %0 = getelementptr %wrapper, %wrapper* %w, i64 0, i32 0 ; <i1*>
211 store i1 true, i1* %0 211 store i1 true, i1* %0
212 ret void 212 ret void
213 } 213 }
214 214
215 215
218 define zeroext i8 @test11() nounwind { 218 define zeroext i8 @test11() nounwind {
219 entry: 219 entry:
220 %a = alloca %struct.singlebool, align 1 ; <%struct.singlebool*> [#uses=2] 220 %a = alloca %struct.singlebool, align 1 ; <%struct.singlebool*> [#uses=2]
221 %storetmp.i = bitcast %struct.singlebool* %a to i1* ; <i1*> [#uses=1] 221 %storetmp.i = bitcast %struct.singlebool* %a to i1* ; <i1*> [#uses=1]
222 store i1 true, i1* %storetmp.i 222 store i1 true, i1* %storetmp.i
223 %tmp = getelementptr %struct.singlebool* %a, i64 0, i32 0 ; <i8*> [#uses=1] 223 %tmp = getelementptr %struct.singlebool, %struct.singlebool* %a, i64 0, i32 0 ; <i8*> [#uses=1]
224 %tmp1 = load i8* %tmp ; <i8> [#uses=1] 224 %tmp1 = load i8, i8* %tmp ; <i8> [#uses=1]
225 ret i8 %tmp1 225 ret i8 %tmp1
226 } 226 }
227 227
228 228
229 %struct.Item = type { [4 x i16], %struct.rule* } 229 %struct.Item = type { [4 x i16], %struct.rule* }
244 ; VLAs. 244 ; VLAs.
245 define void @test12() { 245 define void @test12() {
246 bb4.i: 246 bb4.i:
247 %malloccall = tail call i8* @malloc(i32 0) 247 %malloccall = tail call i8* @malloc(i32 0)
248 %0 = bitcast i8* %malloccall to [0 x %struct.Item]* 248 %0 = bitcast i8* %malloccall to [0 x %struct.Item]*
249 %.sub.i.c.i = getelementptr [0 x %struct.Item]* %0, i32 0, i32 0 ; <%struct.Item*> [#uses=0] 249 %.sub.i.c.i = getelementptr [0 x %struct.Item], [0 x %struct.Item]* %0, i32 0, i32 0 ; <%struct.Item*> [#uses=0]
250 unreachable 250 unreachable
251 } 251 }
252 declare noalias i8* @malloc(i32) 252 declare noalias i8* @malloc(i32)
253 253
254 ; PR8680 254 ; PR8680
266 ; not dominated by the GEP. 266 ; not dominated by the GEP.
267 define fastcc void @test() optsize inlinehint ssp align 2 { 267 define fastcc void @test() optsize inlinehint ssp align 2 {
268 entry: 268 entry:
269 %alloc.0.0 = alloca <4 x float>, align 16 269 %alloc.0.0 = alloca <4 x float>, align 16
270 %bitcast = bitcast <4 x float>* %alloc.0.0 to [4 x float]* 270 %bitcast = bitcast <4 x float>* %alloc.0.0 to [4 x float]*
271 %idx3 = getelementptr inbounds [4 x float]* %bitcast, i32 0, i32 3 271 %idx3 = getelementptr inbounds [4 x float], [4 x float]* %bitcast, i32 0, i32 3
272 store float 0.000000e+00, float* %idx3, align 4 272 store float 0.000000e+00, float* %idx3, align 4
273 br label %for.body10 273 br label %for.body10
274 274
275 for.body10: ; preds = %for.body10, %entry 275 for.body10: ; preds = %for.body10, %entry
276 %loopidx = phi i32 [ 0, %entry ], [ undef, %for.body10 ] 276 %loopidx = phi i32 [ 0, %entry ], [ undef, %for.body10 ]
277 %unusedidx = getelementptr inbounds <4 x float>* %alloc.0.0, i32 0, i32 %loopidx 277 %unusedidx = getelementptr inbounds <4 x float>, <4 x float>* %alloc.0.0, i32 0, i32 %loopidx
278 br i1 undef, label %for.end, label %for.body10 278 br i1 undef, label %for.end, label %for.body10
279 279
280 for.end: ; preds = %for.body10 280 for.end: ; preds = %for.body10
281 store <4 x float> <float -1.000000e+00, float -1.000000e+00, float -1.000000e+00, float 0.000000e+00>, <4 x float>* %alloc.0.0, align 16 281 store <4 x float> <float -1.000000e+00, float -1.000000e+00, float -1.000000e+00, float 0.000000e+00>, <4 x float>* %alloc.0.0, align 16
282 ret void 282 ret void