diff options
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp')
-rw-r--r-- | llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp b/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp index f6d33740a4f..01ac9968181 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp @@ -430,8 +430,8 @@ static bool isArgPassedInSGPR(const Argument *A) { return true; // For non-compute shaders, SGPR inputs are marked with either inreg or byval. - if (F->getAttributes().hasAttribute(A->getArgNo() + 1, Attribute::InReg) || - F->getAttributes().hasAttribute(A->getArgNo() + 1, Attribute::ByVal)) + if (F->getAttributes().hasParamAttribute(A->getArgNo(), Attribute::InReg) || + F->getAttributes().hasParamAttribute(A->getArgNo(), Attribute::ByVal)) return true; // Everything else is in VGPRs. |