llvm-project/clang/test/CodeGen/ppc-sfvarargs.c
Petar Jovanovic 2f264c31d3 [PowerPC] Fix test/CodeGen/ppc-sfvarargs
The issue seems to be that .ll file may either use number of register
value or alias %numUsedRegs, so the check needs to cover both cases.

This will hopefully fix the last regression introduced by r255515.

llvm-svn: 255539
2015-12-14 20:30:02 +00:00

18 lines
427 B
C

// RUN: %clang -O0 --target=powerpc-unknown-linux-gnu -EB -msoft-float -S -emit-llvm %s -o - | FileCheck %s
#include <stdarg.h>
void test(char *fmt, ...) {
va_list ap;
va_start(ap, fmt);
va_arg(ap, double);
va_end(ap);
}
void foo() {
double a;
test("test",a);
}
// CHECK: %{{[0-9]+}} = add i8 %{{[0-9]+|numUsedRegs}}, 1
// CHECK: %{{[0-9]+}} = and i8 %{{[0-9]+}}, -2
// CHECK: %{{[0-9]+}} = mul i8 %{{[0-9]+}}, 4