blob: 47a2aff073d0f1b4629bc2606a88c65d5f9b3a14 [file] [log] [blame]
Tanya Lattner2393a242004-11-06 23:08:26 +00001; RUN: llvm-as -f %s -o - | llc
2
Vikram S. Adve0188ce42002-09-28 16:51:47 +00003; This caused a problem because the argument of a call was defined by
4; the return value of another call that appears later in the code.
5; When processing the first call, the second call has not yet been processed
6; so no LiveRange has been created for its return value.
7;
8; llc dies in UltraSparcRegInfo::suggestRegs4CallArgs() with:
9; ERROR: In call instr, no LR for arg: 0x1009e0740
10;
11implementation ; Functions:
12
13declare int %getInt(int);
14
15int %main(int %argc, sbyte** %argv) {
16bb0: ;[#uses=0]
17 br label %bb2
18
19bb1:
20 %reg222 = call int (int)* %getInt(int %reg218) ;; ARG #1 HAS NO LR
21 %reg110 = add int %reg222, 1
22 %b = setle int %reg110, 0
23 br bool %b, label %bb2, label %bb3
24
25bb2:
26 %reg218 = call int (int)* %getInt(int %argc) ;; THIS CALL NOT YET SEEN
27 br label %bb1
28
29bb3:
30 ret int %reg110
31}
32