AMDGPU/GlobalISel: Fix G_EXTRACT_VECTOR_ELT mapping for s-v case
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 3 Jan 2020 00:01:55 +0000 (19:01 -0500)
committerMatt Arsenault <arsenm2@gmail.com>
Fri, 10 Jan 2020 00:46:54 +0000 (19:46 -0500)
commit5cabb8357aeb3bbecaef4825c3a594f86ef94c8d
tree70b1f00a4dc1f8300dfc2333cd0e6d13e6928e49
parent375371cc8bff7ba02d0a2203f80de5e640fcadf1
AMDGPU/GlobalISel: Fix G_EXTRACT_VECTOR_ELT mapping for s-v case

If an SGPR vector is indexed with a VGPR, the actual indexing will be
done on the SGPR and produce an SGPR. A copy needs to be inserted
inside the waterwall loop to the VGPR result.
llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.h
llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-extract-vector-elt.mir