AMDGPU: Record SGPR spills when restoring too
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 26 Nov 2018 21:28:40 +0000 (21:28 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 26 Nov 2018 21:28:40 +0000 (21:28 +0000)
commit88ce3dcbc8308605c384f7c6e964cf7a1e18ad14
tree8471470da5e2f6dc83470cf511082535bba3df07
parentc81be651662e09a736d1d210deda25eacd4673df
AMDGPU: Record SGPR spills when restoring too

It's possible in some cases to have a restore present
without a corresponding spill. Due to an apparent bug
in D54366 <https://reviews.llvm.org/D54366>, only the
restore for a register was emitted. It's probably
always a bug for this to happen, but due to how SGPR
spilling is implemented, this makes the issues appear
worse than it is.

llvm-svn: 347595
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp