update test
[oota-llvm.git] / test / ExecutionEngine / 2003-08-23-RegisterAllocatePhysReg.ll
1 ; This testcase exposes a bug in the local register allocator where it runs out
2 ; of registers (due to too many overlapping live ranges), but then attempts to
3 ; use the ESP register (which is not allocatable) to hold a value.
4
5 int %main(uint %A) {
6         %Ap2 = alloca uint, uint %A   ; ESP gets used again...
7         %B = add uint %A, 1           ; Produce lots of overlapping live ranges
8         %C = add uint %A, 2
9         %D = add uint %A, 3
10         %E = add uint %A, 4
11         %F = add uint %A, 5
12         %G = add uint %A, 6
13         %H = add uint %A, 7
14         %I = add uint %A, 8
15         %J = add uint %A, 9
16         %K = add uint %A, 10
17
18         store uint %A, uint *%Ap2      ; Uses of all of the values
19         store uint %B, uint *%Ap2
20         store uint %C, uint *%Ap2
21         store uint %D, uint *%Ap2
22         store uint %E, uint *%Ap2
23         store uint %F, uint *%Ap2
24         store uint %G, uint *%Ap2
25         store uint %H, uint *%Ap2
26         store uint %I, uint *%Ap2
27         store uint %J, uint *%Ap2
28         store uint %K, uint *%Ap2
29         ret int 0
30 }