diff options
Diffstat (limited to 'llvm/lib/Target/AMDGPU/R600InstrInfo.cpp')
-rw-r--r-- | llvm/lib/Target/AMDGPU/R600InstrInfo.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Target/AMDGPU/R600InstrInfo.cpp b/llvm/lib/Target/AMDGPU/R600InstrInfo.cpp index 84440d1fc6c..9aaa012ad4d 100644 --- a/llvm/lib/Target/AMDGPU/R600InstrInfo.cpp +++ b/llvm/lib/Target/AMDGPU/R600InstrInfo.cpp @@ -204,8 +204,7 @@ bool R600InstrInfo::usesVertexCache(unsigned Opcode) const { bool R600InstrInfo::usesVertexCache(const MachineInstr *MI) const { const MachineFunction *MF = MI->getParent()->getParent(); - const R600MachineFunctionInfo *MFI = MF->getInfo<R600MachineFunctionInfo>(); - return MFI->getShaderType() != ShaderType::COMPUTE && + return !AMDGPU::isCompute(MF->getFunction()->getCallingConv()) && usesVertexCache(MI->getOpcode()); } @@ -215,8 +214,7 @@ bool R600InstrInfo::usesTextureCache(unsigned Opcode) const { bool R600InstrInfo::usesTextureCache(const MachineInstr *MI) const { const MachineFunction *MF = MI->getParent()->getParent(); - const R600MachineFunctionInfo *MFI = MF->getInfo<R600MachineFunctionInfo>(); - return (MFI->getShaderType() == ShaderType::COMPUTE && + return (AMDGPU::isCompute(MF->getFunction()->getCallingConv()) && usesVertexCache(MI->getOpcode())) || usesTextureCache(MI->getOpcode()); } |