diff options
Diffstat (limited to 'llvm/lib/Target/AMDGPU/SIInstrInfo.h')
-rw-r--r-- | llvm/lib/Target/AMDGPU/SIInstrInfo.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.h b/llvm/lib/Target/AMDGPU/SIInstrInfo.h index aea4c80e19e..b8275b62272 100644 --- a/llvm/lib/Target/AMDGPU/SIInstrInfo.h +++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.h @@ -660,6 +660,14 @@ public: return !RI.isSGPRReg(MRI, Dest); } + bool hasVGPRUses(const MachineInstr &MI) const { + const MachineFunction &MF = *MI.getParent()->getParent(); + const MachineRegisterInfo &MRI = MF.getRegInfo(); + return llvm::any_of(MI.explicit_uses(), + [&MRI, this](const MachineOperand &MO) { + return MO.isReg() && RI.isVGPR(MRI, MO.getReg());}); + } + /// Whether we must prevent this instruction from executing with EXEC = 0. bool hasUnwantedEffectsWhenEXECEmpty(const MachineInstr &MI) const; |