[AMDGPU] Allow buildSpillLoadStore in empty bb
authorSebastian Neubauer <sebastian.neubauer@amd.com>
Thu, 29 Apr 2021 10:52:29 +0000 (12:52 +0200)
committerSebastian Neubauer <sebastian.neubauer@amd.com>
Thu, 29 Apr 2021 10:53:20 +0000 (12:53 +0200)
commit9569d5ba02697f64dda86591cb202f8a4390f710
tree784c6248f557296de72f329938175de3a1c9f491
parent2fa14d47005115341c14f37cb2ab00062a60fe0d
[AMDGPU] Allow buildSpillLoadStore in empty bb

This allows calling buildSpillLoadStore for an empty basic block, where
MI points at the end of the block instead of to an instruction.

This only happens with downstream CFI changes, so I was not able to
create a testcase that works with upstream LLVM.

Differential Revision: https://reviews.llvm.org/D101356
llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
llvm/lib/Target/AMDGPU/SIRegisterInfo.h