[Hexagon] Remove set-but-unused variables (NFC)
authorKazu Hirata <kazu@google.com>
Wed, 27 Oct 2021 06:38:14 +0000 (23:38 -0700)
committerKazu Hirata <kazu@google.com>
Wed, 27 Oct 2021 06:38:15 +0000 (23:38 -0700)
llvm/lib/Target/Hexagon/HexagonBitSimplify.cpp

index 1a9adf8..7f5cf15 100644 (file)
@@ -1305,8 +1305,7 @@ bool RedundantInstrElimination::processBlock(MachineBasicBlock &B,
     return false;
   bool Changed = false;
 
-  for (auto I = B.begin(), E = B.end(), NextI = I; I != E; ++I) {
-    NextI = std::next(I);
+  for (auto I = B.begin(), E = B.end(); I != E; ++I) {
     MachineInstr *MI = &*I;
 
     if (MI->getOpcode() == TargetOpcode::COPY)
@@ -1598,9 +1597,7 @@ bool CopyGeneration::processBlock(MachineBasicBlock &B,
   bool Changed = false;
   RegisterSet Defs;
 
-  for (auto I = B.begin(), E = B.end(), NextI = I; I != E;
-       ++I, AVB.insert(Defs)) {
-    NextI = std::next(I);
+  for (auto I = B.begin(), E = B.end(); I != E; ++I, AVB.insert(Defs)) {
     Defs.clear();
     HBS::getInstrDefs(*I, Defs);