diff options
| author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2016-07-09 01:13:51 +0000 |
|---|---|---|
| committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2016-07-09 01:13:51 +0000 |
| commit | 95c7897555f4f99f5ce71f84ab11b63c256293f2 (patch) | |
| tree | bb80cccf33203803ecfd6bc79659914ae4d80e44 | |
| parent | 152e7c8b1222d2af61df72c08caaa740e553cb6c (diff) | |
| download | bcm5719-llvm-95c7897555f4f99f5ce71f84ab11b63c256293f2.tar.gz bcm5719-llvm-95c7897555f4f99f5ce71f84ab11b63c256293f2.zip | |
AMDGPU: Simplify isSchedulingBoundary
llvm-svn: 274953
| -rw-r--r-- | llvm/lib/Target/AMDGPU/SIInstrInfo.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp index 4f1eb52c88a..213cdc310c8 100644 --- a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp +++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp @@ -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 { |

