[llvm] abce7ac - [RISCV] Remove impossible TODO in RISCVRedundantCopyElimination. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 21 13:18:24 PDT 2022
Author: Craig Topper
Date: 2022-08-21T13:18:02-07:00
New Revision: abce7acebd4c06c977bc4bd79170697f1122bc5e
URL: https://github.com/llvm/llvm-project/commit/abce7acebd4c06c977bc4bd79170697f1122bc5e
DIFF: https://github.com/llvm/llvm-project/commit/abce7acebd4c06c977bc4bd79170697f1122bc5e.diff
LOG: [RISCV] Remove impossible TODO in RISCVRedundantCopyElimination. NFC
If there are multiple conditional branches we shouldn't do any
optimization.
Added:
Modified:
llvm/lib/Target/RISCV/RISCVRedundantCopyElimination.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/RISCVRedundantCopyElimination.cpp b/llvm/lib/Target/RISCV/RISCVRedundantCopyElimination.cpp
index 3c4a60b81d8e..eaaa510daf3d 100644
--- a/llvm/lib/Target/RISCV/RISCVRedundantCopyElimination.cpp
+++ b/llvm/lib/Target/RISCV/RISCVRedundantCopyElimination.cpp
@@ -101,7 +101,6 @@ bool RISCVRedundantCopyElimination::optimizeBlock(MachineBasicBlock &MBB) {
if (!CondBr->isTerminator())
return false;
// If we found a branch with X0, stop searching and try to remove copies.
- // TODO: Handle multiple branches with
diff erent registers.
if (guaranteesZeroRegInBlock(*CondBr, MBB))
break;
// If we reached the beginning of the basic block, give up.
More information about the llvm-commits
mailing list