llvm.org GIT mirror llvm / 0188ce4
Regression test for live range bug for call arguments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3962 91177308-0d34-0410-b5e6-96231b3b80d8 Vikram S. Adve 18 years ago
3 changed file(s) with 90 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; This caused a problem because the argument of a call was defined by
1 ; the return value of another call that appears later in the code.
2 ; When processing the first call, the second call has not yet been processed
3 ; so no LiveRange has been created for its return value.
4 ;
5 ; llc dies in UltraSparcRegInfo::suggestRegs4CallArgs() with:
6 ; ERROR: In call instr, no LR for arg: 0x1009e0740
7 ;
8 implementation ; Functions:
9
10 declare int %getInt(int);
11
12 int %main(int %argc, sbyte** %argv) {
13 bb0: ;[#uses=0]
14 br label %bb2
15
16 bb1:
17 %reg222 = call int (int)* %getInt(int %reg218) ;; ARG #1 HAS NO LR
18 %reg110 = add int %reg222, 1
19 %b = setle int %reg110, 0
20 br bool %b, label %bb2, label %bb3
21
22 bb2:
23 %reg218 = call int (int)* %getInt(int %argc) ;; THIS CALL NOT YET SEEN
24 br label %bb1
25
26 bb3:
27 ret int %reg110
28 }
29
0 ; This caused a problem because the argument of a call was defined by
1 ; the return value of another call that appears later in the code.
2 ; When processing the first call, the second call has not yet been processed
3 ; so no LiveRange has been created for its return value.
4 ;
5 ; llc dies in UltraSparcRegInfo::suggestRegs4CallArgs() with:
6 ; ERROR: In call instr, no LR for arg: 0x1009e0740
7 ;
8 implementation ; Functions:
9
10 declare int %getInt(int);
11
12 int %main(int %argc, sbyte** %argv) {
13 bb0: ;[#uses=0]
14 br label %bb2
15
16 bb1:
17 %reg222 = call int (int)* %getInt(int %reg218) ;; ARG #1 HAS NO LR
18 %reg110 = add int %reg222, 1
19 %b = setle int %reg110, 0
20 br bool %b, label %bb2, label %bb3
21
22 bb2:
23 %reg218 = call int (int)* %getInt(int %argc) ;; THIS CALL NOT YET SEEN
24 br label %bb1
25
26 bb3:
27 ret int %reg110
28 }
29
0 ; This caused a problem because the argument of a call was defined by
1 ; the return value of another call that appears later in the code.
2 ; When processing the first call, the second call has not yet been processed
3 ; so no LiveRange has been created for its return value.
4 ;
5 ; llc dies in UltraSparcRegInfo::suggestRegs4CallArgs() with:
6 ; ERROR: In call instr, no LR for arg: 0x1009e0740
7 ;
8 implementation ; Functions:
9
10 declare int %getInt(int);
11
12 int %main(int %argc, sbyte** %argv) {
13 bb0: ;[#uses=0]
14 br label %bb2
15
16 bb1:
17 %reg222 = call int (int)* %getInt(int %reg218) ;; ARG #1 HAS NO LR
18 %reg110 = add int %reg222, 1
19 %b = setle int %reg110, 0
20 br bool %b, label %bb2, label %bb3
21
22 bb2:
23 %reg218 = call int (int)* %getInt(int %argc) ;; THIS CALL NOT YET SEEN
24 br label %bb1
25
26 bb3:
27 ret int %reg110
28 }
29