aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Laskey <jlaskey@mac.com>2006-12-01 19:29:20 +0000
committerJim Laskey <jlaskey@mac.com>2006-12-01 19:29:20 +0000
commit255b47bda3d62ecaaebb624a13457e9b8da33633 (patch)
tree445ed6e328b37ce48e398fd74b7b0194c5090003
parent5be662505e16c485596b53a8eabc3edb8bc88d17 (diff)
Test for float varargs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32083 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/CodeGen/PowerPC/2006-12-01-float_varg.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/2006-12-01-float_varg.ll b/test/CodeGen/PowerPC/2006-12-01-float_varg.ll
new file mode 100644
index 0000000000..61a0efdea6
--- /dev/null
+++ b/test/CodeGen/PowerPC/2006-12-01-float_varg.ll
@@ -0,0 +1,16 @@
+; RUN: llvm-as < %s | llc -march=ppc64 -o - | tail -n +2 > Output/2006-12-01-float_varg.s
+; RUN: as -arch ppc64 Output/2006-12-01-float_varg.s -o Output/2006-12-01-float_varg.o
+; RUN: gcc -arch ppc64 Output/2006-12-01-float_varg.o -o Output/2006-12-01-float_varg.exe
+; RUN: Output/2006-12-01-float_varg.exe | grep "foo 1.230000 1.231210 3.100000 1.310000"
+
+%str = internal constant [17 x sbyte] c"foo %f %f %f %f\0A\00"
+
+implementation
+
+declare int %printf(sbyte*, ...)
+
+int %main(int %argc, sbyte** %argv) {
+entry:
+ %tmp = tail call int (sbyte*, ...)* %printf( sbyte* getelementptr ([17 x sbyte]* %str, int 0, uint 0), double 1.23, double 1.23121, double 3.1, double 1.31 )
+ ret int 0
+}