[amdgpu] Expand all ConstantExpr users of LDS variables in instructions
authorJon Chesterfield <jonathanchesterfield@gmail.com>
Wed, 14 Sep 2022 06:55:44 +0000 (07:55 +0100)
committerJon Chesterfield <jonathanchesterfield@gmail.com>
Wed, 14 Sep 2022 06:55:46 +0000 (07:55 +0100)
commitcdb9738963a1584d6530bcf7b102423f54a6bdb1
treec1da59a81daa3ed695474f79239c3ee1f3d82c4d
parente280940bfb33eb21925b0b13f04e3b87289b9dea
[amdgpu] Expand all ConstantExpr users of LDS variables in instructions

Bug noted in D112717 can be sidestepped with this change.

Expanding all ConstantExpr involved with LDS up front makes the variable specialisation simpler. Excludes ConstantExpr that don't access LDS to avoid disturbing codegen elsewhere.

Reviewed By: rampitec

Differential Revision: https://reviews.llvm.org/D133422
llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
llvm/lib/Target/AMDGPU/Utils/AMDGPUMemoryUtils.cpp
llvm/lib/Target/AMDGPU/Utils/AMDGPUMemoryUtils.h
llvm/test/CodeGen/AMDGPU/lower-kernel-lds-constexpr.ll
llvm/test/CodeGen/AMDGPU/lower-lds-struct-aa-memcpy.ll
llvm/test/CodeGen/AMDGPU/lower-module-lds-constantexpr-phi.ll [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/lower-module-lds-constantexpr.ll