[AMDGPU] Enable saving SHARED_BASE to VCC (#163244)

This commit is contained in:
carlobertolli
2025-10-13 15:38:28 -05:00
committed by GitHub
parent c5bd68cbd5
commit 8892825917
2 changed files with 10 additions and 1 deletions

View File

@@ -899,7 +899,7 @@ void SIInstrInfo::copyPhysReg(MachineBasicBlock &MBB,
}
if (DestReg == AMDGPU::VCC) {
if (AMDGPU::SReg_64RegClass.contains(SrcReg)) {
if (AMDGPU::SReg_64_EncodableRegClass.contains(SrcReg)) {
BuildMI(MBB, MI, DL, get(AMDGPU::S_MOV_B64), AMDGPU::VCC)
.addReg(SrcReg, getKillRegState(KillSrc));
} else {

View File

@@ -58,6 +58,15 @@ body: |
$sgpr0_sgpr1 = COPY $src_shared_base
...
---
name: src_shared_base_to_vcc
body: |
bb.0:
; GFX9-LABEL: name: src_shared_base_to_vcc
; GFX9: $vcc = S_MOV_B64 $src_shared_base
$vcc = COPY $src_shared_base
...
---
name: sgpr96_aligned_src_dst
body: |