aboutsummaryrefslogtreecommitdiffstats
path: root/test/Feature/calltest.ll
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2008-03-01 07:38:40 +0000
committerTanya Lattner <tonic@nondot.org>2008-03-01 07:38:40 +0000
commit9bc243b2517f4f1aef3319ba01ea6f0788e87cb6 (patch)
treee3b7a85489213ca435df8fdecb7a12601e2f00ac /test/Feature/calltest.ll
parente5101bf52c8c9b96e072c10f1a141ef021971137 (diff)
downloadexternal_llvm-9bc243b2517f4f1aef3319ba01ea6f0788e87cb6.zip
external_llvm-9bc243b2517f4f1aef3319ba01ea6f0788e87cb6.tar.gz
external_llvm-9bc243b2517f4f1aef3319ba01ea6f0788e87cb6.tar.bz2
Remove llvm-upgrade and update tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47784 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Feature/calltest.ll')
-rw-r--r--test/Feature/calltest.ll50
1 files changed, 24 insertions, 26 deletions
diff --git a/test/Feature/calltest.ll b/test/Feature/calltest.ll
index f015223..feafd3c 100644
--- a/test/Feature/calltest.ll
+++ b/test/Feature/calltest.ll
@@ -1,34 +1,32 @@
-; RUN: llvm-upgrade < %s | llvm-as | 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)
-declare int "test"(int) ; Test forward declaration merging
+declare i32 @test(i32) ; Test forward declaration merging
-implementation
-
-void "invoke"(%FunTy *%x) {
- %foo = call %FunTy* %x(int 123)
- %foo2 = tail call %FunTy* %x(int 123)
- ret void
+define void @invoke(%FunTy* %x) {
+ %foo = call i32 %x( i32 123 ) ; <i32> [#uses=0]
+ %foo2 = tail call i32 %x( i32 123 ) ; <i32> [#uses=0]
+ ret void
}
-int "main"(int %argc) ; TODO: , sbyte **argv, sbyte **envp)
-begin
- %retval = call int (int) *%test(int %argc)
- %two = add int %retval, %retval
- %retval2 = invoke int %test(int %argc)
- to label %Next except label %Error
-Next:
- %two2 = add int %two, %retval2
- call void %invoke (%FunTy* %test)
- ret int %two2
-Error:
- ret int -1
-end
+define i32 @main(i32 %argc) {
+ %retval = call i32 @test( i32 %argc ) ; <i32> [#uses=2]
+ %two = add i32 %retval, %retval ; <i32> [#uses=1]
+ %retval2 = invoke i32 @test( i32 %argc )
+ to label %Next unwind label %Error ; <i32> [#uses=1]
+
+Next: ; preds = %0
+ %two2 = add i32 %two, %retval2 ; <i32> [#uses=1]
+ call void @invoke( %FunTy* @test )
+ ret i32 %two2
-int "test"(int %i0)
-begin
- ret int %i0
-end
+Error: ; preds = %0
+ ret i32 -1
+}
+
+define i32 @test(i32 %i0) {
+ ret i32 %i0
+}