Skip to content

Commit 1947b6f

Browse files
committed
Fix copy from physreg
1 parent 5b025cc commit 1947b6f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/Target/AMDGPU/AMDGPURewriteAGPRCopyMFMA.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,11 @@ bool AMDGPURewriteAGPRCopyMFMAImpl::run(MachineFunction &MF) const {
128128
continue;
129129

130130
Register CopySrcReg = DefMI->getOperand(1).getReg();
131-
LiveInterval &CopySrcLI = LIS.getInterval(CopySrcReg);
131+
if (!CopySrcReg.isVirtual())
132+
continue;
132133

134+
LiveInterval &CopySrcLI = LIS.getInterval(CopySrcReg);
133135
LiveQueryResult LRQ = CopySrcLI.Query(VNI->def.getRegSlot());
134-
135136
MachineInstr *CopySrcMI = LIS.getInstructionFromIndex(LRQ.valueIn()->def);
136137
if (!CopySrcMI)
137138
continue;

0 commit comments

Comments
 (0)