xref: /llvm-project/clang/test/CodeGen/PowerPC/ppc-sfvarargs.c (revision 1ea584377e7897f7df5302ed9cd378d17be14fbf)
1 // RUN: %clang -O0 --target=powerpc-unknown-linux-gnu -EB -msoft-float -S -emit-llvm %s -o - | FileCheck %s
2 
3 #include <stdarg.h>
test(char * fmt,...)4 void test(char *fmt, ...) {
5   va_list ap;
6   va_start(ap, fmt);
7   va_arg(ap, double);
8   va_end(ap);
9 }
10 
foo(void)11 void foo(void) {
12   double a;
13   test("test",a);
14 }
15 // CHECK: %{{[0-9]+}} = add i8 %{{[0-9]+|numUsedRegs}}, 1
16 // CHECK: %{{[0-9]+}} = and i8 %{{[0-9]+}}, -2
17 // CHECK: %{{[0-9]+}} = mul i8 %{{[0-9]+}}, 4
18