[AMDGPU] Update base addr of dyn alloca considering GrowingUp stack (#119822)
[llvm-project.git] / clang / test / CodeGen / AArch64 / varargs-sve.c
blob12c0a3651bb9503c051ebc95ec0d969bff160343
1 // REQUIRES: aarch64-registered-target
2 // RUN: not %clang_cc1 -triple aarch64-linux-gnu -target-feature +sve -emit-llvm -o - %s 2>&1 | FileCheck %s
3 // RUN: not %clang_cc1 -triple arm64-apple-ios7 -target-abi darwinpcs -target-feature +sve -emit-llvm -o - %s 2>&1 | FileCheck %s
5 // CHECK: Passing SVE types to variadic functions is currently not supported
7 #include <arm_sve.h>
8 #include <stdarg.h>
10 double foo(char *str, ...) {
11 va_list ap;
12 svfloat64_t v;
13 double x;
15 va_start(ap, str);
16 v = va_arg(ap, svfloat64_t);
17 x = va_arg(ap, double);
18 va_end(ap);
20 return x + svaddv(svptrue_b8(), v);