[llvm-commits] CVS: llvm/test/Feature/varargs.ll

Chris Lattner lattner at cs.uiuc.edu
Tue Oct 21 10:37:01 PDT 2003


Changes in directory llvm/test/Feature:

varargs.ll updated: 1.2 -> 1.3

---
Log message:

Update test to new style


---
Diffs of the changes:  (+9 -11)

Index: llvm/test/Feature/varargs.ll
diff -u llvm/test/Feature/varargs.ll:1.2 llvm/test/Feature/varargs.ll:1.3
--- llvm/test/Feature/varargs.ll:1.2	Wed May  7 22:46:51 2003
+++ llvm/test/Feature/varargs.ll	Tue Oct 21 10:36:21 2003
@@ -2,20 +2,18 @@
 ; the va_arg instruction.
 
 implementation
-declare void %llvm.va_start(sbyte**, ...)
-declare void %llvm.va_copy(sbyte**, sbyte*)
-declare void %llvm.va_end(sbyte**)
+declare sbyte* %llvm.va_start()
+declare sbyte* %llvm.va_copy(sbyte*)
+declare void %llvm.va_end(sbyte*)
 
 int %test(int %X, ...) {
-	%ap = alloca sbyte*
-	%aq = alloca sbyte*
-	call void (sbyte**, ...)* %llvm.va_start(sbyte** %ap, int %X)
-	%apv = load sbyte** %ap
-	call void %llvm.va_copy(sbyte** %aq, sbyte* %apv)
-	call void %llvm.va_end(sbyte** %aq)
+	%ap = call sbyte* %llvm.va_start()
+	%aq = call sbyte* %llvm.va_copy(sbyte* %ap)
+	call void %llvm.va_end(sbyte* %aq)
 	
-	%tmp = va_arg sbyte** %ap, int 
+	%tmp = vaarg sbyte* %ap, int 
+	%ap2 = vanext sbyte* %ap, int
 
-	call void %llvm.va_end(sbyte** %ap)
+	call void %llvm.va_end(sbyte* %ap2)
 	ret int %tmp
 }





More information about the llvm-commits mailing list