https://github.com/pawosm-arm created https://github.com/llvm/llvm-project/pull/184978
The REQUIRES statement in the builtin_vectorelements.c test case is an all-or-nothing declaration, hence all of the required conditions would need to be fulfilled to make this test being executed. Namely, all of those required targets whould have to be registered, which is a rare situstion, therefore this test case is rarely ever executed. This patch changes those REQUIRES statements into %if conditions. These conditions are needed for those particular targets as their test sections do include the header files available only when those targets are registered. >From 10b9d8d15b5d983057e42f5d49749c1220606466 Mon Sep 17 00:00:00 2001 From: Paul Osmialowski <[email protected]> Date: Fri, 6 Mar 2026 09:54:50 +0000 Subject: [PATCH] [clang][test] Ensure the builtin_vectorelements.c test is actually executed The REQUIRES statement in the builtin_vectorelements.c test case is an all-or-nothing declaration, hence all of the required conditions would need to be fulfilled to make this test being executed. Namely, all of those required targets whould have to be registered, which is a rare situstion, therefore this test case is rarely ever executed. This patch changes those REQUIRES statements into %if conditions. These conditions are needed for those particular targets as their test sections do include the header files available only when those targets are registered. --- clang/test/CodeGen/builtin_vectorelements.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/clang/test/CodeGen/builtin_vectorelements.c b/clang/test/CodeGen/builtin_vectorelements.c index 45f7a3c34562b..5cbd68ba67cf9 100644 --- a/clang/test/CodeGen/builtin_vectorelements.c +++ b/clang/test/CodeGen/builtin_vectorelements.c @@ -1,13 +1,7 @@ -// RUN: %clang_cc1 -O1 -triple x86_64 %s -emit-llvm -disable-llvm-passes -o - | FileCheck --check-prefixes=CHECK %s - -// REQUIRES: aarch64-registered-target -// RUN: %clang_cc1 -O1 -triple aarch64 -target-feature +neon %s -emit-llvm -disable-llvm-passes -o - | FileCheck --check-prefixes=CHECK,NEON %s - -// REQUIRES: aarch64-registered-target -// RUN: %clang_cc1 -O1 -triple aarch64 -target-feature +sve %s -emit-llvm -disable-llvm-passes -o - | FileCheck --check-prefixes=CHECK,SVE %s - -// REQUIRES: riscv-registered-target -// RUN: %clang_cc1 -O1 -triple riscv64 -target-feature +v %s -emit-llvm -disable-llvm-passes -o - | FileCheck --check-prefixes=CHECK,RISCV %s +// RUN: %clang_cc1 -O1 -triple x86_64 %s -emit-llvm -disable-llvm-passes -o - | FileCheck --check-prefixes=CHECK %s +// RUN: %if aarch64-registered-target %{ %clang_cc1 -O1 -triple aarch64 -target-feature +neon %s -emit-llvm -disable-llvm-passes -o - | FileCheck --check-prefixes=CHECK,NEON %s %} +// RUN: %if aarch64-registered-target %{ %clang_cc1 -O1 -triple aarch64 -target-feature +sve %s -emit-llvm -disable-llvm-passes -o - | FileCheck --check-prefixes=CHECK,SVE %s %} +// RUN: %if riscv-registered-target %{ %clang_cc1 -O1 -triple riscv64 -target-feature +v %s -emit-llvm -disable-llvm-passes -o - | FileCheck --check-prefixes=CHECK,RISCV %s %} /// Note that this does not make sense to check for x86 SIMD types, because /// __m128i, __m256i, and __m512i do not specify the element type. There are no _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
