AMDGPU/GlobalISel: Implement applyMappingImpl less incorrectly
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 23 Dec 2019 19:39:01 +0000 (14:39 -0500)
committerMatt Arsenault <arsenm2@gmail.com>
Sat, 4 Jan 2020 17:36:05 +0000 (12:36 -0500)
commit5eed4e2664aa7187f46eb12e45a376d7ab7dd308
treecf437c0668e36473f30b2bcbb490bb16b3e1fcea
parent4c6c4e2fce285c16b66a147afb287f7d4fc3c2e1
AMDGPU/GlobalISel: Implement applyMappingImpl less incorrectly

We're checking the current register bank of the registers in the
instruction, but the mapping may have inserted cross bank copies and
is expecting to replace the registers.

We mostly get away with this currently, because VGPR->SGPR copies are
illegal, and we assume this won't happen. In a future change, we'll
start relying on more cross register bank copies being inserted, and
this starts to break down.
llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp