blob: 3231a3cec2914461e0cd64a49b3fbb9f48c2016c [file] [log] [blame]
Chris Lattner6cfca762006-09-03 07:14:47 +00001; RUN: llvm-as < %s | llc -regalloc=local
2
3 %struct.CHESS_POSITION = type { ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, uint, int, sbyte, sbyte, [64 x sbyte], sbyte, sbyte, sbyte, sbyte, sbyte }
4%search = external global %struct.CHESS_POSITION ; <%struct.CHESS_POSITION*> [#uses=2]
5%bishop_shift_rl45 = external global [64 x int] ; <[64 x int]*> [#uses=1]
6%bishop_shift_rr45 = external global [64 x int] ; <[64 x int]*> [#uses=1]
7%black_outpost = external global [64 x sbyte] ; <[64 x sbyte]*> [#uses=1]
8%bishop_mobility_rl45 = external global [64 x [256 x int]] ; <[64 x [256 x int]]*> [#uses=1]
9%bishop_mobility_rr45 = external global [64 x [256 x int]] ; <[64 x [256 x int]]*> [#uses=1]
10
11implementation ; Functions:
12
13declare fastcc int %FirstOne()
14
15fastcc void %Evaluate() {
16entry:
17 br bool false, label %cond_false186, label %cond_true
18
19cond_true: ; preds = %entry
20 ret void
21
22cond_false186: ; preds = %entry
23 br bool false, label %cond_true293, label %bb203
24
25bb203: ; preds = %cond_false186
26 ret void
27
28cond_true293: ; preds = %cond_false186
29 br bool false, label %cond_true298, label %cond_next317
30
31cond_true298: ; preds = %cond_true293
32 br bool false, label %cond_next518, label %cond_true397.preheader
33
34cond_next317: ; preds = %cond_true293
35 ret void
36
37cond_true397.preheader: ; preds = %cond_true298
38 ret void
39
40cond_next518: ; preds = %cond_true298
41 br bool false, label %bb1069, label %cond_true522
42
43cond_true522: ; preds = %cond_next518
44 ret void
45
46bb1069: ; preds = %cond_next518
47 br bool false, label %cond_next1131, label %bb1096
48
49bb1096: ; preds = %bb1069
50 ret void
51
52cond_next1131: ; preds = %bb1069
53 br bool false, label %cond_next1207, label %cond_true1150
54
55cond_true1150: ; preds = %cond_next1131
56 ret void
57
58cond_next1207: ; preds = %cond_next1131
59 br bool false, label %cond_next1219, label %cond_true1211
60
61cond_true1211: ; preds = %cond_next1207
62 ret void
63
64cond_next1219: ; preds = %cond_next1207
65 br bool false, label %cond_true1223, label %cond_next1283
66
67cond_true1223: ; preds = %cond_next1219
68 br bool false, label %cond_true1254, label %cond_true1264
69
70cond_true1254: ; preds = %cond_true1223
71 br bool false, label %bb1567, label %cond_true1369.preheader
72
73cond_true1264: ; preds = %cond_true1223
74 ret void
75
76cond_next1283: ; preds = %cond_next1219
77 ret void
78
79cond_true1369.preheader: ; preds = %cond_true1254
80 ret void
81
82bb1567: ; preds = %cond_true1254
83 %tmp1580 = load ulong* getelementptr (%struct.CHESS_POSITION* %search, int 0, uint 3) ; <ulong> [#uses=1]
84 %tmp1591 = load ulong* getelementptr (%struct.CHESS_POSITION* %search, int 0, uint 4) ; <ulong> [#uses=1]
85 %tmp1572 = tail call fastcc int %FirstOne( ) ; <int> [#uses=5]
86 %tmp1582 = getelementptr [64 x int]* %bishop_shift_rl45, int 0, int %tmp1572 ; <int*> [#uses=1]
87 %tmp1583 = load int* %tmp1582 ; <int> [#uses=1]
88 %tmp1583 = cast int %tmp1583 to ubyte ; <ubyte> [#uses=1]
89 %tmp1584 = shr ulong %tmp1580, ubyte %tmp1583 ; <ulong> [#uses=1]
90 %tmp1584 = cast ulong %tmp1584 to uint ; <uint> [#uses=1]
91 %tmp1585 = and uint %tmp1584, 255 ; <uint> [#uses=1]
92 %tmp1587 = getelementptr [64 x [256 x int]]* %bishop_mobility_rl45, int 0, int %tmp1572, uint %tmp1585 ; <int*> [#uses=1]
93 %tmp1588 = load int* %tmp1587 ; <int> [#uses=1]
94 %tmp1593 = getelementptr [64 x int]* %bishop_shift_rr45, int 0, int %tmp1572 ; <int*> [#uses=1]
95 %tmp1594 = load int* %tmp1593 ; <int> [#uses=1]
96 %tmp1594 = cast int %tmp1594 to ubyte ; <ubyte> [#uses=1]
97 %tmp1595 = shr ulong %tmp1591, ubyte %tmp1594 ; <ulong> [#uses=1]
98 %tmp1595 = cast ulong %tmp1595 to uint ; <uint> [#uses=1]
99 %tmp1596 = and uint %tmp1595, 255 ; <uint> [#uses=1]
100 %tmp1598 = getelementptr [64 x [256 x int]]* %bishop_mobility_rr45, int 0, int %tmp1572, uint %tmp1596 ; <int*> [#uses=1]
101 %tmp1599 = load int* %tmp1598 ; <int> [#uses=1]
102 %tmp1600.neg = sub int 0, %tmp1588 ; <int> [#uses=1]
103 %tmp1602 = sub int %tmp1600.neg, %tmp1599 ; <int> [#uses=1]
104 %tmp1604 = getelementptr [64 x sbyte]* %black_outpost, int 0, int %tmp1572 ; <sbyte*> [#uses=1]
105 %tmp1605 = load sbyte* %tmp1604 ; <sbyte> [#uses=1]
106 %tmp1606 = seteq sbyte %tmp1605, 0 ; <bool> [#uses=1]
107 br bool %tmp1606, label %cond_next1637, label %cond_true1607
108
109cond_true1607: ; preds = %bb1567
110 ret void
111
112cond_next1637: ; preds = %bb1567
113 %tmp1662 = sub int %tmp1602, 0 ; <int> [#uses=0]
114 ret void
115}