Testcase for P926
[oota-llvm.git] / test / CodeGen / X86 / test-load-fold.ll
1 ; RUN: llvm-as < %s | llc
2         %struct._obstack_chunk = type { sbyte*, %struct._obstack_chunk*, [4 x sbyte] }
3         %struct.obstack = type { int, %struct._obstack_chunk*, sbyte*, sbyte*, sbyte*, int, int, %struct._obstack_chunk* (...)*, void (...)*, sbyte*, ubyte }
4 %stmt_obstack = external global %struct.obstack         ; <%struct.obstack*> [#uses=1]
5
6 implementation   ; Functions:
7
8 void %expand_start_bindings() {
9 entry:
10         br bool false, label %cond_true, label %cond_next
11
12 cond_true:              ; preds = %entry
13         %new_size.0.i = select bool false, int 0, int 0         ; <int> [#uses=1]
14         %tmp.i = load uint* cast (ubyte* getelementptr (%struct.obstack* %stmt_obstack, int 0, uint 10) to uint*)               ; <uint> [#uses=1]
15         %tmp.i = cast uint %tmp.i to ubyte              ; <ubyte> [#uses=1]
16         %tmp21.i = and ubyte %tmp.i, 1          ; <ubyte> [#uses=1]
17         %tmp22.i = seteq ubyte %tmp21.i, 0              ; <bool> [#uses=1]
18         br bool %tmp22.i, label %cond_false30.i, label %cond_true23.i
19
20 cond_true23.i:          ; preds = %cond_true
21         ret void
22
23 cond_false30.i:         ; preds = %cond_true
24         %tmp35.i = tail call %struct._obstack_chunk* null( int %new_size.0.i )          ; <%struct._obstack_chunk*> [#uses=0]
25         ret void
26
27 cond_next:              ; preds = %entry
28         ret void
29 }