Don't try to simplify urem and srem using arithmetic rules that don't work
[oota-llvm.git] / test / Transforms / InstCombine / 2006-09-11-EmptyStructCrash.ll
1 ; PR905
2 ; RUN: llvm-as < %s | opt -instcombine -disable-output
3         
4 %RPYTHON_EXCEPTION = type { %RPYTHON_EXCEPTION_VTABLE* }
5 %RPYTHON_EXCEPTION_VTABLE = type { %RPYTHON_EXCEPTION_VTABLE*, i32, i32, %RPyOpaque_RuntimeTypeInfo*, %arraytype_Char*, %functiontype_12* }
6 %RPyOpaque_RuntimeTypeInfo = type opaque*
7 %arraytype_Char = type { i32, [0 x i8] }
8 %fixarray_array1019 = type [1019 x i8*]
9 %functiontype_12 = type %RPYTHON_EXCEPTION* ()
10 %functiontype_14 = type void (%structtype_pypy.rpython.memory.gc.MarkSweepGC*)
11 %structtype_AddressLinkedListChunk = type { %structtype_AddressLinkedListChunk*, i32, %fixarray_array1019 }
12 %structtype_exceptions.Exception = type { %RPYTHON_EXCEPTION }
13 %structtype_gc_pool = type {  }
14 %structtype_gc_pool_node = type { %structtype_header*, %structtype_gc_pool_node* }
15 %structtype_header = type { i32, %structtype_header* }
16 %structtype_pypy.rpython.memory.gc.MarkSweepGC = type { %structtype_exceptions.Exception, i32, i32, i1, %structtype_gc_pool*, i32, %structtype_header*, %structtype_header*, %structtype_gc_pool_node*, double, double }
17
18 define fastcc void @pypy_MarkSweepGC.collect() {
19 block0:
20         %v1221 = load %structtype_AddressLinkedListChunk** null         ; <%structtype_AddressLinkedListChunk*> [#uses=1]
21         %v1222 = icmp ne %structtype_AddressLinkedListChunk* %v1221, null               ; <i1> [#uses=1]
22         br i1 %v1222, label %block79, label %block4
23
24 block4:         ; preds = %block0
25         ret void
26
27 block22:                ; preds = %block79
28         ret void
29
30 block67:                ; preds = %block79
31         %v1459 = load %structtype_gc_pool** null                ; <%structtype_gc_pool*> [#uses=1]
32         %v1460 = bitcast %structtype_gc_pool* %v1459 to i8*             ; <i8*> [#uses=1]
33         %tmp_873 = ptrtoint i8* %v1460 to i32           ; <i32> [#uses=1]
34         %tmp_874 = sub i32 %tmp_873, 0          ; <i32> [#uses=1]
35         %v1461 = inttoptr i32 %tmp_874 to i8*           ; <i8*> [#uses=1]
36         %v1462 = bitcast i8* %v1461 to %structtype_header*              ; <%structtype_header*> [#uses=1]
37         %tmp_876 = getelementptr %structtype_header* %v1462, i32 0, i32 0               ; <i32*> [#uses=1]
38         store i32 0, i32* %tmp_876
39         ret void
40
41 block79:                ; preds = %block0
42         %v1291 = load %structtype_gc_pool** null                ; <%structtype_gc_pool*> [#uses=1]
43         %v1292 = icmp ne %structtype_gc_pool* %v1291, null              ; <i1> [#uses=1]
44         br i1 %v1292, label %block67, label %block22
45 }