Skip to content

Commit d9e986e

Browse files
authored
[clang][OpenMP][test] Use x86_64-linux-gnu triple for test referencing avx512f feature (#111337)
This test passes as-is on non-X86 hosts only because almost no target implements `isValidFeatureName` (the default implementation unconditionally returns true). RISC-V does implement it, and like X86 checks that the feature name is one supported by the architecture. This means the test creates an additional warning on RISC-V due to `_attribute__((target("avx512f")))`. The simple solution here is to just explicitly target x86_64-linux-gnu.
1 parent 8df6637 commit d9e986e

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

clang/test/OpenMP/declare_variant_device_isa_codegen_1.c

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
// RUN: %clang_cc1 -verify -fopenmp -x c -triple %itanium_abi_triple -emit-llvm %s -o - -fopenmp-version=45 | FileCheck %s --check-prefix=GENERIC
2-
// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple %itanium_abi_triple -fexceptions -fcxx-exceptions -emit-pch -o %t -fopenmp-version=45 %s
3-
// RUN: %clang_cc1 -fopenmp -x c++ -triple %itanium_abi_triple -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fopenmp-version=45 | FileCheck %s --check-prefix=GENERIC
1+
// RUN: %clang_cc1 -verify -fopenmp -x c -triple x86_64-linux-gnu -emit-llvm %s -o - -fopenmp-version=45 | FileCheck %s --check-prefix=GENERIC
2+
// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-linux-gnu -fexceptions -fcxx-exceptions -emit-pch -o %t -fopenmp-version=45 %s
3+
// RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-linux-gnu -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fopenmp-version=45 | FileCheck %s --check-prefix=GENERIC
44

5-
// RUN: %clang_cc1 -target-feature +avx512f -verify -fopenmp -x c -triple %itanium_abi_triple -emit-llvm %s -o - -fopenmp-version=45 | FileCheck %s --check-prefix=WITHFEATURE
6-
// RUN: %clang_cc1 -target-feature +avx512f -fopenmp -x c++ -std=c++11 -triple %itanium_abi_triple -fexceptions -fcxx-exceptions -emit-pch -o %t -fopenmp-version=45 %s
7-
// RUN: %clang_cc1 -target-feature +avx512f -fopenmp -x c++ -triple %itanium_abi_triple -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fopenmp-version=45 | FileCheck %s --check-prefix=WITHFEATURE
5+
// RUN: %clang_cc1 -target-feature +avx512f -verify -fopenmp -x c -triple x86_64-linux-gnu -emit-llvm %s -o - -fopenmp-version=45 | FileCheck %s --check-prefix=WITHFEATURE
6+
// RUN: %clang_cc1 -target-feature +avx512f -fopenmp -x c++ -std=c++11 -triple x86_64-linux-gnu -fexceptions -fcxx-exceptions -emit-pch -o %t -fopenmp-version=45 %s
7+
// RUN: %clang_cc1 -target-feature +avx512f -fopenmp -x c++ -triple x86_64-linux-gnu -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fopenmp-version=45 | FileCheck %s --check-prefix=WITHFEATURE
88

9-
// RUN: %clang_cc1 -verify -fopenmp -x c -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck %s --check-prefix=GENERIC
10-
// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple %itanium_abi_triple -fexceptions -fcxx-exceptions -emit-pch -o %t %s
11-
// RUN: %clang_cc1 -fopenmp -x c++ -triple %itanium_abi_triple -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix=GENERIC
9+
// RUN: %clang_cc1 -verify -fopenmp -x c -triple x86_64-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=GENERIC
10+
// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-linux-gnu -fexceptions -fcxx-exceptions -emit-pch -o %t %s
11+
// RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-linux-gnu -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix=GENERIC
1212

13-
// RUN: %clang_cc1 -target-feature +avx512f -verify -fopenmp -x c -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck %s --check-prefix=WITHFEATURE
14-
// RUN: %clang_cc1 -target-feature +avx512f -fopenmp -x c++ -std=c++11 -triple %itanium_abi_triple -fexceptions -fcxx-exceptions -emit-pch -o %t %s
15-
// RUN: %clang_cc1 -target-feature +avx512f -fopenmp -x c++ -triple %itanium_abi_triple -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix=WITHFEATURE
13+
// RUN: %clang_cc1 -target-feature +avx512f -verify -fopenmp -x c -triple x86_64-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=WITHFEATURE
14+
// RUN: %clang_cc1 -target-feature +avx512f -fopenmp -x c++ -std=c++11 -triple x86_64-linux-gnu -fexceptions -fcxx-exceptions -emit-pch -o %t %s
15+
// RUN: %clang_cc1 -target-feature +avx512f -fopenmp -x c++ -triple x86_64-linux-gnu -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix=WITHFEATURE
1616

1717
// expected-no-diagnostics
1818

0 commit comments

Comments
 (0)