mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-21 03:32:21 +00:00
R600/SI: Add hack to copy from a VGPR to VCC
This hopefully should be fixed when VReg_1 is removed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229225 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4eba62d6c2
commit
582d603f17
@ -332,6 +332,16 @@ SIInstrInfo::copyPhysReg(MachineBasicBlock &MBB,
|
||||
return;
|
||||
|
||||
} else if (AMDGPU::SReg_64RegClass.contains(DestReg)) {
|
||||
if (DestReg == AMDGPU::VCC) {
|
||||
// FIXME: Hack until VReg_1 removed.
|
||||
|
||||
assert(AMDGPU::VGPR_32RegClass.contains(SrcReg));
|
||||
BuildMI(MBB, MI, DL, get(AMDGPU::V_CMP_NE_I32_e32), AMDGPU::VCC)
|
||||
.addImm(0)
|
||||
.addReg(SrcReg, getKillRegState(KillSrc));
|
||||
return;
|
||||
}
|
||||
|
||||
assert(AMDGPU::SReg_64RegClass.contains(SrcReg));
|
||||
BuildMI(MBB, MI, DL, get(AMDGPU::S_MOV_B64), DestReg)
|
||||
.addReg(SrcReg, getKillRegState(KillSrc));
|
||||
|
Loading…
x
Reference in New Issue
Block a user