[PATCH] D128252: [AMDGPU] Lowering VGPR to SGPR copies to v_readfirstlane_b32 if profitable.
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 15 02:17:40 PDT 2022
foad added a comment.
In D128252#3648385 <https://reviews.llvm.org/D128252#3648385>, @alex-t wrote:
> In D128252#3644778 <https://reviews.llvm.org/D128252#3644778>, @foad wrote:
>
>> In future I would like VGPR-to-SGPR copies to be legal
>
> They are already legal.
Currently `SIInstrInfo::copyPhysReg` does this:
if (RI.isSGPRClass(RC)) {
if (!RI.isSGPRClass(SrcRC)) {
reportIllegalCopy(this, MBB, MI, DL, DestReg, SrcReg, KillSrc);
return;
}
That is why I say they are illegal. I would like to change this, so that copyPhysReg will allow them and implement them by emitting readfirstlane.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128252/new/
https://reviews.llvm.org/D128252
More information about the llvm-commits
mailing list