From: Matt Arsenault Date: Tue, 3 Jan 2023 14:21:56 +0000 (-0500) Subject: AMDGPU: Diagnose which LDS global failed to lower X-Git-Tag: upstream/17.0.6~22305 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6fed2c90d3b9fabe8742ae1308632c06dd4b76ea;p=platform%2Fupstream%2Fllvm.git AMDGPU: Diagnose which LDS global failed to lower Also lowercase the message to start since that seems to be the prevailing convention for error messages. --- diff --git a/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp b/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp index 65e72e0..11ba5c9 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp @@ -721,8 +721,9 @@ public: if (K.second.size() == 1) { KernelAccessVariables.insert(GV); } else { - report_fatal_error("Cannot lower LDS to kernel access as it is " - "reachable from multiple kernels"); + report_fatal_error( + "cannot lower LDS '" + GV->getName() + + "' to kernel access as it is reachable from multiple kernels"); } break; diff --git a/llvm/test/CodeGen/AMDGPU/lower-module-lds-single-var-ambiguous.ll b/llvm/test/CodeGen/AMDGPU/lower-module-lds-single-var-ambiguous.ll index 66d357f..bb2fc02 100644 --- a/llvm/test/CodeGen/AMDGPU/lower-module-lds-single-var-ambiguous.ll +++ b/llvm/test/CodeGen/AMDGPU/lower-module-lds-single-var-ambiguous.ll @@ -36,7 +36,7 @@ define amdgpu_kernel void @k1() { ;; Function accesses variable, reachable from two kernels, can't use kernel lowering for either ;; Hybrid can put it in module lds without cost as the first variable is free -; KERNEL: LLVM ERROR: Cannot lower LDS to kernel access as it is reachable from multiple kernels +; KERNEL: LLVM ERROR: cannot lower LDS 'function.lds' to kernel access as it is reachable from multiple kernels @function.lds = addrspace(3) global i16 undef define void @f0() {