]> granicus.if.org Git - llvm/commit
AMDGPU: Fix emitting multiple stack loads for stack passed workitems
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 5 Sep 2019 23:40:14 +0000 (23:40 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 5 Sep 2019 23:40:14 +0000 (23:40 +0000)
commitc8c66a280fa359b4886cabea5b0c228479e10b84
tree3242b2c48c64933a930258c9e1ba6917410b1b30
parent62b1147efa5688328d04600538075305005af15d
AMDGPU: Fix emitting multiple stack loads for stack passed workitems

The same stack is loaded for each workitem ID, and each use. Nothing
prevents you from creating multiple fixed stack objects with the same
offsets, so this was creating a load for each unique frame index,
despite them being the same offset. Re-use the same frame index so the
loads are CSEable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371148 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/AMDGPUISelLowering.cpp
test/CodeGen/AMDGPU/callee-special-input-vgprs.ll