2006-12-03 17:17:19 +01:00
|
|
|
; RUN: llvm-upgrade %s | llvm-as -f -o %t.bc
|
2004-11-07 00:32:43 +01:00
|
|
|
; RUN: lli %t.bc > /dev/null
|
|
|
|
|
2002-12-03 21:30:03 +01:00
|
|
|
|
2002-12-04 18:15:07 +01:00
|
|
|
declare void %exit(int)
|
2002-12-03 21:30:03 +01:00
|
|
|
|
2002-12-28 21:01:07 +01:00
|
|
|
int %test(sbyte %C, short %S) {
|
2004-11-22 20:50:41 +01:00
|
|
|
%X = cast short %S to ubyte
|
|
|
|
%Y = cast ubyte %X to int
|
|
|
|
ret int %Y
|
2002-12-28 21:01:07 +01:00
|
|
|
}
|
2002-12-13 15:15:20 +01:00
|
|
|
|
|
|
|
void %FP(void(int) * %F) {
|
2002-12-28 21:01:07 +01:00
|
|
|
%X = call int %test(sbyte 123, short 1024)
|
|
|
|
call void %F(int %X)
|
2002-12-13 15:15:20 +01:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2002-12-13 05:43:32 +01:00
|
|
|
int %main() {
|
2002-12-13 15:15:20 +01:00
|
|
|
call void %FP(void(int)* %exit)
|
2002-12-13 05:43:32 +01:00
|
|
|
ret int 1
|
2002-12-03 21:30:03 +01:00
|
|
|
}
|