If killed register is defined by implicit_def, do not clear it since it's live range...
[oota-llvm.git] / test / CodeGen / ARM / 2009-06-12-RegScavengerAssert.ll
1 ; RUN: llvm-as < %s | llc -mtriple=armv6-apple-darwin
2
3         type { i32, i32, %struct.D_Sym**, [3 x %struct.D_Sym*] }                ; type %0
4         type { i32, %struct.D_Reduction** }             ; type %1
5         type { i32, %struct.D_RightEpsilonHint* }               ; type %2
6         type { i32, %struct.D_ErrorRecoveryHint* }              ; type %3
7         type { i32, i32, %struct.D_Reduction**, [3 x %struct.D_Reduction*] }            ; type %4
8         %struct.D_ErrorRecoveryHint = type { i16, i16, i8* }
9         %struct.D_ParseNode = type { i32, %struct.d_loc_t, i8*, i8*, %struct.D_Scope*, void (%struct.D_Parser*, %struct.d_loc_t*, i8**)*, i8*, i8* }
10         %struct.D_Parser = type { i8*, void (%struct.D_Parser*, %struct.d_loc_t*, i8**)*, %struct.D_Scope*, void (%struct.D_Parser*)*, %struct.D_ParseNode* (%struct.D_Parser*, i32, %struct.D_ParseNode**)*, void (%struct.D_ParseNode*)*, %struct.d_loc_t, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
11         %struct.D_ParserTables = type { i32, %struct.D_State*, i16*, i32, i32, %struct.D_Symbol*, void (%struct.D_Parser*, %struct.d_loc_t*, i8**)*, i32, %struct.D_Pass*, i32 }
12         %struct.D_Pass = type { i8*, i32, i32, i32 }
13         %struct.D_Reduction = type { i16, i16, i32 (i8*, i8**, i32, i32, %struct.D_Parser*)*, i32 (i8*, i8**, i32, i32, %struct.D_Parser*)*, i16, i16, i32, i32, i32, i32, i32 (i8*, i8**, i32, i32, %struct.D_Parser*)** }
14         %struct.D_RightEpsilonHint = type { i16, i16, %struct.D_Reduction* }
15         %struct.D_Scope = type { i8, %struct.D_Sym*, %struct.D_SymHash*, %struct.D_Sym*, %struct.D_Scope*, %struct.D_Scope*, %struct.D_Scope*, %struct.D_Scope*, %struct.D_Scope* }
16         %struct.D_Shift = type { i16, i8, i8, i32, i32, i32 (i8*, i8**, i32, i32, %struct.D_Parser*)* }
17         %struct.D_State = type { i8*, i32, %1, %2, %3, %struct.D_Shift**, i32 (i8**, i32*, i32*, i16*, i32*, i8*, i32*)*, i8*, i8, i8, i8, i8*, %struct.D_Shift***, i32 }
18         %struct.D_Sym = type { i8*, i32, i32, %struct.D_Sym*, %struct.D_Sym*, i32 }
19         %struct.D_SymHash = type { i32, i32, %0 }
20         %struct.D_Symbol = type { i32, i8*, i32 }
21         %struct.PNode = type { i32, i32, i32, i32, %struct.D_Reduction*, %struct.D_Shift*, i32, %struct.VecPNode, i32, i8, i8, %struct.PNode*, %struct.PNode*, %struct.PNode*, %struct.PNode*, i8*, i8*, %struct.D_Scope*, i8*, %struct.D_ParseNode }
22         %struct.PNodeHash = type { %struct.PNode**, i32, i32, i32, %struct.PNode* }
23         %struct.Parser = type { %struct.D_Parser, i8*, i8*, %struct.D_ParserTables*, i32, i32, i32, i32, i32, i32, i32, %struct.PNodeHash, %struct.SNodeHash, %struct.Reduction*, %struct.Shift*, %struct.D_Scope*, %struct.SNode*, i32, %struct.Reduction*, %struct.Shift*, i32, %struct.PNode*, %struct.SNode*, %struct.ZNode*, %4, %struct.ShiftResult*, %struct.D_Shift, %struct.Parser*, i8* }
24         %struct.Reduction = type { %struct.ZNode*, %struct.SNode*, %struct.D_Reduction*, %struct.SNode*, i32, %struct.Reduction* }
25         %struct.SNode = type { %struct.D_State*, %struct.D_Scope*, i8*, %struct.d_loc_t, i32, %struct.PNode*, %struct.VecZNode, i32, %struct.SNode*, %struct.SNode* }
26         %struct.SNodeHash = type { %struct.SNode**, i32, i32, i32, %struct.SNode*, %struct.SNode* }
27         %struct.Shift = type { %struct.SNode*, %struct.Shift* }
28         %struct.ShiftResult = type { %struct.D_Shift*, %struct.d_loc_t }
29         %struct.VecPNode = type { i32, i32, %struct.PNode**, [3 x %struct.PNode*] }
30         %struct.VecSNode = type { i32, i32, %struct.SNode**, [3 x %struct.SNode*] }
31         %struct.VecZNode = type { i32, i32, %struct.ZNode**, [3 x %struct.ZNode*] }
32         %struct.ZNode = type { %struct.PNode*, %struct.VecSNode }
33         %struct.d_loc_t = type { i8*, i8*, i32, i32, i32 }
34
35 declare void @llvm.memcpy.i32(i8* nocapture, i8* nocapture, i32, i32) nounwind
36
37 define fastcc i32 @exhaustive_parse(%struct.Parser* %p, i32 %state) nounwind {
38 entry:
39         store i8* undef, i8** undef, align 4
40         %0 = getelementptr %struct.Parser* %p, i32 0, i32 0, i32 6              ; <%struct.d_loc_t*> [#uses=1]
41         %1 = bitcast %struct.d_loc_t* %0 to i8*         ; <i8*> [#uses=1]
42         call void @llvm.memcpy.i32(i8* undef, i8* %1, i32 20, i32 4)
43         br label %bb10
44
45 bb10:           ; preds = %bb30, %bb29, %bb26, %entry
46         br i1 undef, label %bb18, label %bb20
47
48 bb18:           ; preds = %bb10
49         br i1 undef, label %bb20, label %bb19
50
51 bb19:           ; preds = %bb18
52         br label %bb20
53
54 bb20:           ; preds = %bb19, %bb18, %bb10
55         br i1 undef, label %bb21, label %bb22
56
57 bb21:           ; preds = %bb20
58         unreachable
59
60 bb22:           ; preds = %bb20
61         br i1 undef, label %bb24, label %bb26
62
63 bb24:           ; preds = %bb22
64         unreachable
65
66 bb26:           ; preds = %bb22
67         br i1 undef, label %bb10, label %bb29
68
69 bb29:           ; preds = %bb26
70         br i1 undef, label %bb10, label %bb30
71
72 bb30:           ; preds = %bb29
73         br i1 undef, label %bb31, label %bb10
74
75 bb31:           ; preds = %bb30
76         unreachable
77 }