[PATCH] D158747: [NFC] Remove redundant code
Mateusz Hurnik via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 24 08:58:13 PDT 2023
tomatih created this revision.
tomatih added a reviewer: arsenm.
Herald added subscribers: foad, kerbowa, hiraditya, jvesely.
Herald added a project: All.
tomatih requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.
Coverity flagged an "Unchecked return value" issue.
I have investigated it and the `isUndef` function is constant with no arguments, only returning a value.
The function does make an assert, but it isn't relevant as next time `Cond[1]` is used is in the `preserveCondRegFlags` function which again calls `isUndef` on it this time using the return value.
As such the line is truly redundant and has been removed.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D158747
Files:
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
Index: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+++ llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
@@ -2896,7 +2896,6 @@
= getBranchOpcode(static_cast<BranchPredicate>(Cond[0].getImm()));
if (!FBB) {
- Cond[1].isUndef();
MachineInstr *CondBr =
BuildMI(&MBB, DL, get(Opcode))
.addMBB(TBB);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158747.553146.patch
Type: text/x-patch
Size: 422 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230824/ca5d9450/attachment.bin>
More information about the llvm-commits
mailing list