[llvm] 4aaf772 - [PeepholeOptimizer] Remove dead code
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 20 08:51:33 PDT 2020
Author: Jay Foad
Date: 2020-08-20T16:48:57+01:00
New Revision: 4aaf77254296a3dddbbca416c5adfc3c6d63a0e7
URL: https://github.com/llvm/llvm-project/commit/4aaf77254296a3dddbbca416c5adfc3c6d63a0e7
DIFF: https://github.com/llvm/llvm-project/commit/4aaf77254296a3dddbbca416c5adfc3c6d63a0e7.diff
LOG: [PeepholeOptimizer] Remove dead code
At this point we have already ruled out all def operands, so we can't
possibly see a dead implicit def operand.
Added:
Modified:
llvm/lib/CodeGen/PeepholeOptimizer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/PeepholeOptimizer.cpp b/llvm/lib/CodeGen/PeepholeOptimizer.cpp
index d55341cd3540..05c843078fb1 100644
--- a/llvm/lib/CodeGen/PeepholeOptimizer.cpp
+++ b/llvm/lib/CodeGen/PeepholeOptimizer.cpp
@@ -1357,9 +1357,6 @@ bool PeepholeOptimizer::foldImmediate(
MachineOperand &MO = MI.getOperand(i);
if (!MO.isReg() || MO.isDef())
continue;
- // Ignore dead implicit defs.
- if (MO.isImplicit() && MO.isDead())
- continue;
Register Reg = MO.getReg();
if (!Reg.isVirtual())
continue;
More information about the llvm-commits
mailing list