| 1 |
// RUN: %clang_cc1 -triple s390x-ibm-linux -emit-llvm -fzvector -o - %s \ |
| 2 |
// RUN: -Wno-undefined-internal 2>&1 | FileCheck %s |
| 3 |
// |
| 4 |
// Test the emission of the "s390x-visible-vector-ABI" module flag. |
| 5 |
|
| 6 |
// Passing vector argument to varargs function between static functions. This |
| 7 |
// also potentially exposes the vector ABI as the va_list may be passed on to |
| 8 |
// another (global) function. |
| 9 |
|
| 10 |
typedef __attribute__((vector_size(16))) int v4i32; |
| 11 |
|
| 12 |
static int bar(int N, ...); |
| 13 |
|
| 14 |
static void foo() { |
| 15 |
v4i32 Var = {0, 0, 0, 0}; |
| 16 |
bar(0, Var); |
| 17 |
} |
| 18 |
|
| 19 |
void fun() { foo(); } |
| 20 |
|
| 21 |
//CHECK: !llvm.module.flags = !{!0, !1} |
| 22 |
//CHECK: !0 = !{i32 2, !"s390x-visible-vector-ABI", i32 1} |