blob: 27e16f0f34f71456515cd5f95b36ada16df779bc [file] [log] [blame]
Daniel Dunbar46a27162010-11-13 00:28:01 +00001; RUN: lli %s > /dev/null
Tanya Lattnere9789ef2004-11-06 23:32:43 +00002
Tanya Lattnerceca1942008-03-10 07:21:50 +00003declare void @exit(i32)
Chris Lattnerac676be2002-12-03 20:30:03 +00004
Tanya Lattnerceca1942008-03-10 07:21:50 +00005define i32 @test(i8 %C, i16 %S) {
6 %X = trunc i16 %S to i8 ; <i8> [#uses=1]
7 %Y = zext i8 %X to i32 ; <i32> [#uses=1]
8 ret i32 %Y
Chris Lattner6cc36d42002-12-28 20:01:07 +00009}
Chris Lattnere4adeb42002-12-13 14:15:20 +000010
Tanya Lattnerceca1942008-03-10 07:21:50 +000011define void @FP(void (i32)* %F) {
12 %X = call i32 @test( i8 123, i16 1024 ) ; <i32> [#uses=1]
13 call void %F( i32 %X )
Chris Lattnere4adeb42002-12-13 14:15:20 +000014 ret void
15}
16
Tanya Lattnerceca1942008-03-10 07:21:50 +000017define i32 @main() {
18 call void @FP( void (i32)* @exit )
19 ret i32 1
Chris Lattnerac676be2002-12-03 20:30:03 +000020}
Tanya Lattnerceca1942008-03-10 07:21:50 +000021