Files
clang-p2996/llvm/test/CodeGen/AMDGPU/lds-run-twice.ll
Vigneshwar Jayakumar d2c817df84 [AMDGPU] Fix DynLDS causing crash when LowerLDS is run at fullLTO pipeline (#96038)
Direct mapped dynamic LDS is not lowered in the LowerLDSModule pass.
Hence it is not marked with an absolute symbol. When the LowerLDS pass is
rerun in LTO, compilation fails with an assert "cannot mix abs and non-abs LDVs".
This patch adds an additional check for direct mapped dynLDS to skip the assert.

Fixes SWDEV-454281
2024-06-28 21:05:48 -05:00

19 lines
607 B
LLVM

; XFAIL: target={{.*}}-aix{{.*}}
; RUN: opt -S -mtriple=amdgcn-- -amdgpu-lower-module-lds %s -o %t.ll
; RUN: opt -S -mtriple=amdgcn-- -amdgpu-lower-module-lds %t.ll -o %t.second.ll
; RUN: diff -ub %t.ll %t.second.ll -I ".*ModuleID.*"
; Check AMDGPULowerModuleLDS can run more than once on the same module, and that
; the second run is a no-op.
@dynlds = external addrspace(3) global [0 x i32], align 4
@lds = internal unnamed_addr addrspace(3) global i32 undef, align 4
define amdgpu_kernel void @test() {
entry:
store i32 0, ptr addrspace(3) @dynlds
store i32 1, ptr addrspace(3) @lds
ret void
}