[llvm] 71c6a36 - [AMDGPU][NFC] Remove redundant condition
Adam Balogh via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 1 00:02:11 PDT 2020
Author: Adam Balogh
Date: 2020-07-01T09:04:25+02:00
New Revision: 71c6a36018dd3e3a8f709d4a6f81a6d3ce56d780
URL: https://github.com/llvm/llvm-project/commit/71c6a36018dd3e3a8f709d4a6f81a6d3ce56d780
DIFF: https://github.com/llvm/llvm-project/commit/71c6a36018dd3e3a8f709d4a6f81a6d3ce56d780.diff
LOG: [AMDGPU][NFC] Remove redundant condition
Condition `LiteralCount` is checked both in an outer and in an inner
`if` statement in `SIInstrInfo::verifyInstruction()`. This patch removes
the redundant inner check.
The issue was found using `clang-tidy` check under review
`misc-redundant-condition`. See https://reviews.llvm.org/D81272.
Differential Revision: https://reviews.llvm.org/D82555
Added:
Modified:
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
index ffb4073340ed..f6364b76351d 100644
--- a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
@@ -3775,7 +3775,7 @@ bool SIInstrInfo::verifyInstruction(const MachineInstr &MI,
}
if (isVOP3(MI) && LiteralCount) {
- if (LiteralCount && !ST.hasVOP3Literal()) {
+ if (!ST.hasVOP3Literal()) {
ErrInfo = "VOP3 instruction uses literal";
return false;
}
More information about the llvm-commits
mailing list