AMDGPU: Fix wrong null value for private address space
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Sun, 24 May 2020 16:28:59 +0000 (12:28 -0400)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 26 May 2020 20:35:13 +0000 (16:35 -0400)
commitbb10fa3a53f928e2e24ad3eaf8e57508fe9d4320
treed999e2d53476ed453c776ad5531d4eae353dc866
parentc990bdf7f8761f047fac85615377835edf015698
AMDGPU: Fix wrong null value for private address space

I'm guessing this was a holdover from when 0 was an invalid stack
pointer, but surprised nobody has discovered this before.

Also don't allow offset folding for -1 pointers, since it looks weird
to partially fold this.
llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.h
llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-load-private.mir
llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-addrspacecast.mir
llvm/test/CodeGen/AMDGPU/addrspacecast.ll
llvm/test/CodeGen/AMDGPU/nullptr.ll