[AMDGPU] Corrrectly emit AGPR copies in tryFoldPhiAGPR
authorpvanhout <pierre.vanhoutryve@amd.com>
Wed, 12 Jul 2023 13:13:02 +0000 (15:13 +0200)
committerpvanhout <pierre.vanhoutryve@amd.com>
Thu, 13 Jul 2023 06:55:22 +0000 (08:55 +0200)
commit361e9eec515a55cccd11728c253eb5aa4d7cf7fd
treec4157c5d4dc717e1c993be105bc36ce2bc20e7c6
parent96ae0851c26237378fa1280b0a9ad713e1b72bdb
[AMDGPU] Corrrectly emit AGPR copies in  tryFoldPhiAGPR

- Don't create COPY instructions between PHI nodes.
- Don't create V_ACCVGPR_WRITE with operands that aren't AGPR_32

Solves SWDEV-410408

Reviewed By: #amdgpu, arsenm

Differential Revision: https://reviews.llvm.org/D155080
llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
llvm/test/CodeGen/AMDGPU/fold-agpr-phis.mir