AMDGPU: Simplify isSchedulingBoundary

llvm-svn: 274953
This commit is contained in:
Matt Arsenault 2016-07-09 01:13:51 +00:00
parent 152e7c8b12
commit 95c7897555
1 changed files with 4 additions and 5 deletions

View File

@ -1455,14 +1455,13 @@ MachineInstr *SIInstrInfo::convertToThreeAddress(MachineFunction::iterator &MBB,
bool SIInstrInfo::isSchedulingBoundary(const MachineInstr &MI,
const MachineBasicBlock *MBB,
const MachineFunction &MF) const {
// XXX - Do we want the SP check in the base implementation?
// Target-independent instructions do not have an implicit-use of EXEC, even
// when they operate on VGPRs. Treating EXEC modifications as scheduling
// boundaries prevents incorrect movements of such instructions.
const SIRegisterInfo *TRI = MF.getSubtarget<SISubtarget>().getRegisterInfo();
if (MI.modifiesRegister(AMDGPU::EXEC, TRI))
return true;
return AMDGPUInstrInfo::isSchedulingBoundary(MI, MBB, MF);
return TargetInstrInfo::isSchedulingBoundary(MI, MBB, MF) ||
MI.modifiesRegister(AMDGPU::EXEC, &RI);
}
bool SIInstrInfo::isInlineConstant(const APInt &Imm) const {