forked from OSchip/llvm-project
R600/SI: Insert more NOPs after READLANE on VI, don't use NOPs on CI
This is a candidate for stable. llvm-svn: 233080
This commit is contained in:
parent
949f5dab95
commit
aab1a8daee
|
@ -268,7 +268,22 @@ void SIRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator MI,
|
|||
.addReg(SubReg);
|
||||
}
|
||||
}
|
||||
TII->insertNOPs(MI, 3);
|
||||
|
||||
// TODO: only do this when it is needed
|
||||
switch (MF->getSubtarget<AMDGPUSubtarget>().getGeneration()) {
|
||||
case AMDGPUSubtarget::SOUTHERN_ISLANDS:
|
||||
// "VALU writes SGPR" -> "SMRD reads that SGPR" needs "S_NOP 3" on SI
|
||||
TII->insertNOPs(MI, 3);
|
||||
break;
|
||||
case AMDGPUSubtarget::SEA_ISLANDS:
|
||||
break;
|
||||
default: // VOLCANIC_ISLANDS and later
|
||||
// "VALU writes SGPR -> VMEM reads that SGPR" needs "S_NOP 4" on VI
|
||||
// and later. This also applies to VALUs which write VCC, but we're
|
||||
// unlikely to see VMEM use VCC.
|
||||
TII->insertNOPs(MI, 4);
|
||||
}
|
||||
|
||||
MI->eraseFromParent();
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue