Convert more tests to avoid llvm-as.
[oota-llvm.git] / test / CodeGen / Generic / spillccr.ll
1 ; RUN: llc < %s
2
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.
12 ;
13
14         %Graph = type %struct.graph_st*
15         %Hash = type %struct.hash*
16         %HashEntry = type %struct.hash_entry*
17         %Vertex = type %struct.vert_st*
18         %struct.graph_st = type { [1 x %Vertex] }
19         %struct.hash = type { %HashEntry*, i32 (i32)*, i32 }
20         %struct.hash_entry = type { i32, i8*, %HashEntry }
21         %struct.vert_st = type { i32, %Vertex, %Hash }
22 @HashRange = external global i32                ; <i32*> [#uses=0]
23 @.LC0 = internal global [13 x i8] c"Make phase 2\00"            ; <[13 x i8]*> [#uses=0]
24 @.LC1 = internal global [13 x i8] c"Make phase 3\00"            ; <[13 x i8]*> [#uses=0]
25 @.LC2 = internal global [13 x i8] c"Make phase 4\00"            ; <[13 x i8]*> [#uses=0]
26 @.LC3 = internal global [15 x i8] c"Make returning\00"          ; <[15 x i8]*> [#uses=0]
27
28 define %Graph @MakeGraph(i32 %numvert, i32 %numproc) {
29 bb1:
30         %reg111 = add i32 %numproc, -1          ; <i32> [#uses=2]
31         %cond275 = icmp slt i32 %reg111, 1              ; <i1> [#uses=1]
32         %cond276 = icmp sle i32 %reg111, 0              ; <i1> [#uses=1]
33         %cond277 = icmp sge i32 %numvert, 0             ; <i1> [#uses=1]
34         %reg162 = add i32 %numvert, 3           ; <i32> [#uses=0]
35         br i1 %cond275, label %bb7, label %bb4
36
37 bb4:            ; preds = %bb1
38         br i1 %cond276, label %bb7, label %bb5
39
40 bb5:            ; preds = %bb4
41         br i1 %cond277, label %bb7, label %bb6
42
43 bb6:            ; preds = %bb5
44         ret %Graph null
45
46 bb7:            ; preds = %bb5, %bb4, %bb1
47         ret %Graph null
48 }
49