Skip to content

Commit a961ba8

Browse files
authored
AMDGPU: Use reportFatalUsageError for LDS mixed absolute addresses (#145135)
1 parent 60d1276 commit a961ba8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

llvm/lib/Target/AMDGPU/AMDGPUMemoryUtils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,8 @@ LDSUsesInfoTy getTransitiveUsesOfLDS(const CallGraph &CG, Module &M) {
278278
}
279279
if (HasAbsoluteGVs.has_value()) {
280280
if (*HasAbsoluteGVs != IsAbsolute) {
281-
report_fatal_error(
282-
"Module cannot mix absolute and non-absolute LDS GVs");
281+
reportFatalUsageError(
282+
"module cannot mix absolute and non-absolute LDS GVs");
283283
}
284284
} else
285285
HasAbsoluteGVs = IsAbsolute;

llvm/test/CodeGen/AMDGPU/lds-reject-mixed-absolute-addresses.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
; RUN: not --crash opt -S -mtriple=amdgcn-- -amdgpu-lower-module-lds < %s 2>&1 | FileCheck %s
2-
; RUN: not --crash opt -S -mtriple=amdgcn-- -passes=amdgpu-lower-module-lds < %s 2>&1 | FileCheck %s
1+
; RUN: not opt -S -mtriple=amdgcn-- -amdgpu-lower-module-lds < %s 2>&1 | FileCheck %s
2+
; RUN: not opt -S -mtriple=amdgcn-- -passes=amdgpu-lower-module-lds < %s 2>&1 | FileCheck %s
33

44
@var1 = addrspace(3) global i32 poison, !absolute_symbol !0
55
@var2 = addrspace(3) global i32 poison
66

7-
; CHECK: Module cannot mix absolute and non-absolute LDS GVs
7+
; CHECK: LLVM ERROR: module cannot mix absolute and non-absolute LDS GVs
88
define amdgpu_kernel void @kern() {
99
%val0 = load i32, ptr addrspace(3) @var1
1010
%val1 = add i32 %val0, 4

0 commit comments

Comments
 (0)