[AMDGPU] Legalize initialized LDS variables
authorChristudasan Devadasan <Christudasan.Devadasan@amd.com>
Thu, 16 Sep 2021 16:06:16 +0000 (12:06 -0400)
committerChristudasan Devadasan <Christudasan.Devadasan@amd.com>
Fri, 24 Sep 2021 02:53:20 +0000 (22:53 -0400)
commit7a62a5b56d670c4e152159740cd7fc4030a9470f
treea4003b2a75fcc68dffd135035e0ee031946c06de
parentafab3c488f0c86af87e262cc7454e04de18e3e6a
[AMDGPU] Legalize initialized LDS variables

We don't allow an initializer for LDS variables
and there is an early abort during instruction
selection. This patch legalizes them by ignoring
the init values. During assembly emission, proper
error reporting already exists for such instances.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D109901
llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/lds-zero-initializer.ll
llvm/test/CodeGen/AMDGPU/lds-zero-initializer.ll