llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Alex Bradbury (asb)

<details>
<summary>Changes</summary>

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.

---
Full diff: https://github.com/llvm/llvm-project/pull/111337.diff


1 Files Affected:

- (modified) clang/test/OpenMP/declare_variant_device_isa_codegen_1.c (+12-12) 


``````````diff
diff --git a/clang/test/OpenMP/declare_variant_device_isa_codegen_1.c 
b/clang/test/OpenMP/declare_variant_device_isa_codegen_1.c
index 029270ab848663..47367536550ac1 100644
--- a/clang/test/OpenMP/declare_variant_device_isa_codegen_1.c
+++ b/clang/test/OpenMP/declare_variant_device_isa_codegen_1.c
@@ -1,18 +1,18 @@
-// RUN: %clang_cc1 -verify -fopenmp -x c -triple %itanium_abi_triple 
-emit-llvm %s -o - -fopenmp-version=45 | FileCheck %s --check-prefix=GENERIC
-// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple %itanium_abi_triple 
-fexceptions -fcxx-exceptions -emit-pch -o %t -fopenmp-version=45 %s
-// 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
+// RUN: %clang_cc1 -verify -fopenmp -x c -triple x86_64-linux-gnu -emit-llvm 
%s -o - -fopenmp-version=45 | FileCheck %s --check-prefix=GENERIC
+// 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
+// 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
 
-// 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
-// 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
-// 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
+// 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
+// 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
+// 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
 
-// RUN: %clang_cc1 -verify -fopenmp -x c -triple %itanium_abi_triple 
-emit-llvm %s -o - | FileCheck %s --check-prefix=GENERIC
-// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple %itanium_abi_triple 
-fexceptions -fcxx-exceptions -emit-pch -o %t %s
-// 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
+// RUN: %clang_cc1 -verify -fopenmp -x c -triple x86_64-linux-gnu -emit-llvm 
%s -o - | FileCheck %s --check-prefix=GENERIC
+// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-linux-gnu 
-fexceptions -fcxx-exceptions -emit-pch -o %t %s
+// 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
 
-// RUN: %clang_cc1 -target-feature +avx512f -verify -fopenmp -x c -triple 
%itanium_abi_triple -emit-llvm %s -o - | FileCheck %s --check-prefix=WITHFEATURE
-// RUN: %clang_cc1 -target-feature +avx512f -fopenmp -x c++ -std=c++11 -triple 
%itanium_abi_triple -fexceptions -fcxx-exceptions -emit-pch -o %t %s
-// 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
+// RUN: %clang_cc1 -target-feature +avx512f -verify -fopenmp -x c -triple 
x86_64-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=WITHFEATURE
+// 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
+// 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
 
 // expected-no-diagnostics
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/111337
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to