blob: 6ae7506fd34079cbdd95345d27c275c76aa1c6bf [file] [log] [blame]
Reid Spencerd05b67d2006-12-02 20:38:10 +00001; RUN: llvm-upgrade %s | llvm-as | llc
Tanya Lattner2393a242004-11-06 23:08:26 +00002
Vikram S. Advea7a1c7e2002-07-10 21:54:05 +00003; 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.
12;
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 }
Chris Lattner1fbaa0a2003-01-15 18:06:37 +000021%HashRange = uninitialized global int ; <int*> [#uses=1]
Vikram S. Advea7a1c7e2002-07-10 21:54:05 +000022%.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]
26
27implementation ; Functions:
28
29%Graph %MakeGraph(int %numvert, int %numproc) {
30bb1: ;[#uses=1]
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
37
38bb4:
39 br bool %cond276, label %bb7, label %bb5
40
41bb5:
42 br bool %cond277, label %bb7, label %bb6
43
44bb6: ;[#uses=2]
45 ret %Graph null
46
47bb7: ;[#uses=2]
48 ret %Graph null
49}
50