Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp:113: Possible bad expression ? #90281

Closed
dcb314 opened this issue Apr 26, 2024 · 2 comments
Closed

Comments

@dcb314
Copy link

dcb314 commented Apr 26, 2024

Static analyser cppcheck says:

llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp:113:38: style: Same expression on both sides of '||'. [duplicateExpression]

Source code is

if (!AMDGPU::isGraphics(CC) ||
((CC == CallingConv::AMDGPU_CS || CC == CallingConv::AMDGPU_CS) &&
ST.hasArchitectedSGPRs())) {

Suggest code rework.

@dcb314 dcb314 added code-quality llvm Umbrella label for LLVM issues labels Apr 26, 2024
@EugeneZelenko EugeneZelenko added backend:AMDGPU and removed llvm Umbrella label for LLVM issues labels Apr 26, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Apr 26, 2024

@llvm/issue-subscribers-backend-amdgpu

Author: None (dcb314)

Static analyser cppcheck says:

llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp:113:38: style: Same expression on both sides of '||'. [duplicateExpression]

Source code is

if (!AMDGPU::isGraphics(CC) ||
((CC == CallingConv::AMDGPU_CS || CC == CallingConv::AMDGPU_CS) &&
ST.hasArchitectedSGPRs())) {

Suggest code rework.

@arsenm
Copy link
Contributor

arsenm commented Apr 27, 2024

I think this is also missing the AMDGPU_CS_Chain and AMDGPU_CS_ChainPreserved cases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants