36 lines · plain
1; RUN: %lli -jit-kind=mcjit %s > /dev/null2; RUN: %lli %s > /dev/null3 4; This testcase exposes a bug in the local register allocator where it runs out5; of registers (due to too many overlapping live ranges), but then attempts to6; use the ESP register (which is not allocatable) to hold a value.7 8define i32 @main(i32 %A) {9 ; ESP gets used again...10 %Ap2 = alloca i32, i32 %A ; <ptr> [#uses=11]11 ; Produce lots of overlapping live ranges12 %B = add i32 %A, 1 ; <i32> [#uses=1]13 %C = add i32 %A, 2 ; <i32> [#uses=1]14 %D = add i32 %A, 3 ; <i32> [#uses=1]15 %E = add i32 %A, 4 ; <i32> [#uses=1]16 %F = add i32 %A, 5 ; <i32> [#uses=1]17 %G = add i32 %A, 6 ; <i32> [#uses=1]18 %H = add i32 %A, 7 ; <i32> [#uses=1]19 %I = add i32 %A, 8 ; <i32> [#uses=1]20 %J = add i32 %A, 9 ; <i32> [#uses=1]21 %K = add i32 %A, 10 ; <i32> [#uses=1]22 ; Uses of all of the values23 store i32 %A, ptr %Ap224 store i32 %B, ptr %Ap225 store i32 %C, ptr %Ap226 store i32 %D, ptr %Ap227 store i32 %E, ptr %Ap228 store i32 %F, ptr %Ap229 store i32 %G, ptr %Ap230 store i32 %H, ptr %Ap231 store i32 %I, ptr %Ap232 store i32 %J, ptr %Ap233 store i32 %K, ptr %Ap234 ret i32 035}36