1 ; RUN: llvm-upgrade %s | llvm-as | llc
3 ; July 6, 2002 -- LLC Regression test
4 ; This test case checks if the integer CC register %xcc (or %ccr)
5 ; is correctly spilled. The code fragment came from function
6 ; MakeGraph in Olden-mst.
7 ; The original code made all comparisons with 0, so that the %xcc
8 ; register is not needed for the branch in the first basic block.
9 ; Replace 0 with 1 in the first comparson so that the
10 ; branch-on-register instruction cannot be used directly, i.e.,
11 ; the %xcc register is needed for the first branch.
13 %Graph = type %struct.graph_st*
14 %Hash = type %struct.hash*
15 %HashEntry = type %struct.hash_entry*
16 %Vertex = type %struct.vert_st*
17 %struct.graph_st = type { [1 x %Vertex] }
18 %struct.hash = type { %HashEntry*, int (uint)*, int }
19 %struct.hash_entry = type { uint, sbyte*, %HashEntry }
20 %struct.vert_st = type { int, %Vertex, %Hash }
21 %HashRange = uninitialized global int ; <int*> [#uses=1]
22 %.LC0 = internal global [13 x sbyte] c"Make phase 2\00" ; <[13 x sbyte]*> [#uses=1]
23 %.LC1 = internal global [13 x sbyte] c"Make phase 3\00" ; <[13 x sbyte]*> [#uses=1]
24 %.LC2 = internal global [13 x sbyte] c"Make phase 4\00" ; <[13 x sbyte]*> [#uses=1]
25 %.LC3 = internal global [15 x sbyte] c"Make returning\00" ; <[15 x sbyte]*> [#uses=1]
27 implementation ; Functions:
29 %Graph %MakeGraph(int %numvert, int %numproc) {
31 %reg111 = add int %numproc, -1 ; <int> [#uses=3]
32 %cond275 = setlt int %reg111, 1 ; <bool> [#uses=2]
33 %cond276 = setle int %reg111, 0 ; <bool> [#uses=1]
34 %cond277 = setge int %numvert, 0 ; <bool> [#uses=2]
35 %reg162 = add int %numvert, 3 ; <int> [#uses=2]
36 br bool %cond275, label %bb7, label %bb4
39 br bool %cond276, label %bb7, label %bb5
42 br bool %cond277, label %bb7, label %bb6