AMDGPU/GlobalISel: Insert readfirstlane on SGPR returns
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Sat, 15 Feb 2020 02:23:07 +0000 (21:23 -0500)
committerMatt Arsenault <arsenm2@gmail.com>
Tue, 10 Mar 2020 15:18:48 +0000 (11:18 -0400)
commit67cfbec7461312ce6c1a8f38ad4f45b7886d51ef
treef116a301ff0112f60a5d20efe9746c3342d2ab4d
parenta314050065042ac4e0fc39a774b9d396cb3a0e9d
AMDGPU/GlobalISel: Insert readfirstlane on SGPR returns

In case the source value ends up in a VGPR, insert a readfirstlane to
avoid producing an illegal copy later. If it turns out to be
unnecessary, it can be folded out.
llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/bswap.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-amdgpu_ps.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-amdgpu_vs.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.s.buffer.load.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-amdgcn.s.buffer.load.ll