X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2FFeature%2Fsimplecalltest.ll;h=64522864d5776040d5da563675dcd1bc14ea8b08;hb=2c7ee9baa351ed0873ea522005aec4e639370d45;hp=37fa6c62ab2fbfe22cf3574d6a54dbdc7c450207;hpb=3f7706b5d23aca56a6d3a62ebb9466e1e89335f7;p=oota-llvm.git diff --git a/test/Feature/simplecalltest.ll b/test/Feature/simplecalltest.ll index 37fa6c62ab2..64522864d57 100644 --- a/test/Feature/simplecalltest.ll +++ b/test/Feature/simplecalltest.ll @@ -1,29 +1,24 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as < %s | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll -%FunTy = type int(int) + %FunTy = type i32 (i32) -implementation +define void @invoke(%FunTy* %x) { + %foo = call i32 %x( i32 123 ) ; [#uses=0] + ret void +} -void "invoke"(%FunTy *%x) -begin - %foo = call %FunTy* %x(int 123) - ret void -end +define i32 @main(i32 %argc, i8** %argv, i8** %envp) { + %retval = call i32 @test( i32 %argc ) ; [#uses=2] + %two = add i32 %retval, %retval ; [#uses=1] + %retval2 = call i32 @test( i32 %argc ) ; [#uses=1] + %two2 = add i32 %two, %retval2 ; [#uses=1] + call void @invoke( %FunTy* @test ) + ret i32 %two2 +} -int "main"(int %argc, sbyte **%argv, sbyte **%envp) -begin - %retval = call int (int) *%test(int %argc) - %two = add int %retval, %retval - %retval2 = call int %test(int %argc) +define i32 @test(i32 %i0) { + ret i32 %i0 +} - %two2 = add int %two, %retval2 - call void %invoke (%FunTy* %test) - ret int %two2 -end - -int "test"(int %i0) -begin - ret int %i0 -end