Author: Matt Arsenault
Date: 2026-06-25T09:10:58+02:00
New Revision: e5f8e65fb2579fa71c812805fbee8b06db690b0c

URL: 
https://github.com/llvm/llvm-project/commit/e5f8e65fb2579fa71c812805fbee8b06db690b0c
DIFF: 
https://github.com/llvm/llvm-project/commit/e5f8e65fb2579fa71c812805fbee8b06db690b0c.diff

LOG: clang: Fix referring to __builtin_amdgcn_is_processor in diagnostic 
(#205725)

The builtin name is really __builtin_amdgcn_processor_is.

Added: 
    

Modified: 
    clang/include/clang/Basic/DiagnosticSemaKinds.td
    clang/test/SemaHIP/amdgpu-feature-predicates-guard-use.hip

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td 
b/clang/include/clang/Basic/DiagnosticSemaKinds.td
index cde99dfb16ec5..e3aa1c7bfeb5b 100644
--- a/clang/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td
@@ -14267,7 +14267,7 @@ def warn_amdgcn_unguarded_asm_stmt
     InGroup<UnguardedBuiltinUsageAMDGPU>, DefaultIgnore;
 def note_amdgcn_unguarded_asm_silence
   : Note<"enclose the '%0' ASM sequence in a scope controlled by a "
-         "__builtin_amdgcn_is_processor check to silence this warning">;
+         "__builtin_amdgcn_processor_is check to silence this warning">;
 def err_amdgcn_incompatible_builtin
   : Error<"%0 cannot be invoked in the current context, as it requires the "
           "'%1' feature(s)%select{|, which '%3' does not provide}2">;

diff  --git a/clang/test/SemaHIP/amdgpu-feature-predicates-guard-use.hip 
b/clang/test/SemaHIP/amdgpu-feature-predicates-guard-use.hip
index 1566bc9aa0be5..345849374e6fd 100644
--- a/clang/test/SemaHIP/amdgpu-feature-predicates-guard-use.hip
+++ b/clang/test/SemaHIP/amdgpu-feature-predicates-guard-use.hip
@@ -10,7 +10,7 @@ __device__ void g();
 __device__ void f(int x, bool b) {
     long v15_16;
     __asm volatile("v_lshlrev_b64 v[15:16], 0, %0" : "={v[15:16]}"(v15_16) : 
"v"(x)); // expected-warning {{the 'v_lshlrev_b64 v[15:16], 0, $0' ASM sequence 
might be invalid for some AMDGPU targets}}
-    // expected-note@-1 {{enclose the 'v_lshlrev_b64 v[15:16], 0, $0' ASM 
sequence in a scope controlled by a __builtin_amdgcn_is_processor check to 
silence this warning}}
+    // expected-note@-1 {{enclose the 'v_lshlrev_b64 v[15:16], 0, $0' ASM 
sequence in a scope controlled by a __builtin_amdgcn_processor_is check to 
silence this warning}}
 
     if (__builtin_amdgcn_processor_is("gfx90a")) {
         long v15_16;
@@ -20,7 +20,7 @@ __device__ void f(int x, bool b) {
     if (!__builtin_amdgcn_processor_is("gfx90a")) {
         long v15_16;
         __asm volatile("v_lshlrev_b64 v[15:16], 0, %0" : "={v[15:16]}"(v15_16) 
: "v"(x)); // expected-warning {{the 'v_lshlrev_b64 v[15:16], 0, $0' ASM 
sequence might be invalid for some AMDGPU targets}}
-        // expected-note@-1 {{enclose the 'v_lshlrev_b64 v[15:16], 0, $0' ASM 
sequence in a scope controlled by a __builtin_amdgcn_is_processor check to 
silence this warning}}
+        // expected-note@-1 {{enclose the 'v_lshlrev_b64 v[15:16], 0, $0' ASM 
sequence in a scope controlled by a __builtin_amdgcn_processor_is check to 
silence this warning}}
     }
 
     __builtin_amdgcn_is_invocable(__builtin_amdgcn_s_sleep_var) ? 
__builtin_amdgcn_s_sleep_var(x) : __builtin_trap();


        
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to