new testcase
[oota-llvm.git] / test / CodeGen / Generic / 2006-06-13-ComputeMaskedBitsCrash.ll
1 ; RUN: llvm-as < %s | llc -fast
2
3         %struct.cl_perfunc_opts = type { ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, int, int, int, int, int, int, int }
4 %cl_pf_opts = external global %struct.cl_perfunc_opts           ; <%struct.cl_perfunc_opts*> [#uses=2]
5
6 implementation   ; Functions:
7
8 void %set_flags_from_O() {
9 entry:
10         %tmp22 = setgt int 0, 0         ; <bool> [#uses=1]
11         br bool %tmp22, label %cond_true23, label %cond_next159
12
13 cond_true23:            ; preds = %entry
14         %tmp138 = getelementptr %struct.cl_perfunc_opts* %cl_pf_opts, int 0, uint 8             ; <ubyte*> [#uses=1]
15         %tmp138 = cast ubyte* %tmp138 to uint*          ; <uint*> [#uses=2]
16         %tmp139 = load uint* %tmp138            ; <uint> [#uses=1]
17         %tmp140 = shl uint 1, ubyte 27          ; <uint> [#uses=1]
18         %tmp141 = and uint %tmp140, 134217728           ; <uint> [#uses=1]
19         %tmp142 = and uint %tmp139, 4160749567          ; <uint> [#uses=1]
20         %tmp143 = or uint %tmp142, %tmp141              ; <uint> [#uses=1]
21         store uint %tmp143, uint* %tmp138
22         %tmp144 = getelementptr %struct.cl_perfunc_opts* %cl_pf_opts, int 0, uint 8             ; <ubyte*> [#uses=1]
23         %tmp144 = cast ubyte* %tmp144 to uint*          ; <uint*> [#uses=1]
24         %tmp145 = load uint* %tmp144            ; <uint> [#uses=1]
25         %tmp146 = shl uint %tmp145, ubyte 22            ; <uint> [#uses=1]
26         %tmp147 = shr uint %tmp146, ubyte 31            ; <uint> [#uses=1]
27         %tmp147 = cast uint %tmp147 to ubyte            ; <ubyte> [#uses=1]
28         %tmp148 = seteq ubyte %tmp147, 0                ; <bool> [#uses=1]
29         br bool %tmp148, label %cond_true149, label %cond_next159
30
31 cond_true149:           ; preds = %cond_true23
32         %tmp150 = cast ubyte* null to uint*             ; <uint*> [#uses=0]
33         ret void
34
35 cond_next159:           ; preds = %cond_true23, %entry
36         ret void
37 }