blob: 734d2b270b2fdfd2313c9c8d9b9eb9b6b870de4b [file] [log] [blame]
Reid Spencer0db64ca2006-12-19 02:07:11 +00001; RUN: llvm-upgrade < %s | llvm-as | llc
Tanya Lattner2393a242004-11-06 23:08:26 +00002
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
Dan Gohman318f0de2007-07-16 13:37:30 +000013declare int %getInt(int)
Vikram S. Adve0188ce42002-09-28 16:51:47 +000014
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