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