File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed
Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -1493,10 +1493,6 @@ bool SIFoldOperandsImpl::foldCopyToAGPRRegSequence(MachineInstr *CopyMI) const {
14931493 // copies via different reg classes.
14941494 if (!TRI->isAGPR (*MRI, CopyMI->getOperand (0 ).getReg ()))
14951495 return false ;
1496- unsigned Size = TII->getOpSize (*CopyMI, 1 );
1497- if (Size <= 4 )
1498- return false ;
1499-
15001496 Register UseReg = CopyMI->getOperand (1 ).getReg ();
15011497 SmallVector<std::pair<MachineOperand *, unsigned >, 32 > Defs;
15021498 if (!getRegSeqInit (Defs, UseReg, AMDGPU::OPERAND_REG_INLINE_C_INT32))
@@ -1512,7 +1508,7 @@ bool SIFoldOperandsImpl::foldCopyToAGPRRegSequence(MachineInstr *CopyMI) const {
15121508 MachineInstrBuilder B (*MBB.getParent (), CopyMI);
15131509 DenseMap<TargetInstrInfo::RegSubRegPair, Register> VGPRCopies;
15141510 SmallSetVector<TargetInstrInfo::RegSubRegPair, 32 > SeenAGPRs;
1515- for (unsigned I = 0 ; I < Size / 4 ; ++I) {
1511+ for (unsigned I = 0 , NumElts = Defs. size (); I != NumElts ; ++I) {
15161512 MachineOperand *Def = Defs[I].first ;
15171513 TargetInstrInfo::RegSubRegPair CopyToVGPR;
15181514 if (Def->isImm () &&
You can’t perform that action at this time.
0 commit comments