[llvm] 4b64ce7 - Improve 723fea23079f9c85800e5cdc90a75414af182bfd - Silence 'warning: unused variable' when compiling with Clang 10.0
Alexandre Ganea via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 24 06:07:33 PDT 2020
Author: Alexandre Ganea
Date: 2020-09-24T09:07:22-04:00
New Revision: 4b64ce7428b66cacfe74dbd9dbc29aff6dfb84af
URL: https://github.com/llvm/llvm-project/commit/4b64ce7428b66cacfe74dbd9dbc29aff6dfb84af
DIFF: https://github.com/llvm/llvm-project/commit/4b64ce7428b66cacfe74dbd9dbc29aff6dfb84af.diff
LOG: Improve 723fea23079f9c85800e5cdc90a75414af182bfd - Silence 'warning: unused variable' when compiling with Clang 10.0
Added:
Modified:
llvm/lib/CodeGen/PeepholeOptimizer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/PeepholeOptimizer.cpp b/llvm/lib/CodeGen/PeepholeOptimizer.cpp
index 4f05468d976b..e35671113703 100644
--- a/llvm/lib/CodeGen/PeepholeOptimizer.cpp
+++ b/llvm/lib/CodeGen/PeepholeOptimizer.cpp
@@ -1413,10 +1413,8 @@ bool PeepholeOptimizer::foldRedundantCopy(
MachineInstr *PrevCopy = CopyMIs.find(SrcPair)->second;
-#ifndef NDEBUG
- unsigned PrevSrcSubReg = PrevCopy->getOperand(1).getSubReg();
-#endif
- assert(SrcSubReg == PrevSrcSubReg && "Unexpected mismatching subreg!");
+ assert(SrcSubReg == PrevCopy->getOperand(1).getSubReg() &&
+ "Unexpected mismatching subreg!");
Register PrevDstReg = PrevCopy->getOperand(0).getReg();
More information about the llvm-commits
mailing list