[llvm] r350618 - [GlobalISel] Fix unused variable warning in Release builds.
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 8 04:54:27 PST 2019
Author: d0k
Date: Tue Jan 8 04:54:26 2019
New Revision: 350618
URL: http://llvm.org/viewvc/llvm-project?rev=350618&view=rev
Log:
[GlobalISel] Fix unused variable warning in Release builds.
Modified:
llvm/trunk/lib/CodeGen/GlobalISel/RegBankSelect.cpp
Modified: llvm/trunk/lib/CodeGen/GlobalISel/RegBankSelect.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GlobalISel/RegBankSelect.cpp?rev=350618&r1=350617&r2=350618&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/GlobalISel/RegBankSelect.cpp (original)
+++ llvm/trunk/lib/CodeGen/GlobalISel/RegBankSelect.cpp Tue Jan 8 04:54:26 2019
@@ -714,14 +714,13 @@ RegBankSelect::RepairingPlacement::Repai
// - Terminators must be the last instructions:
// * Before, move the insert point before the first terminator.
// * After, we have to split the outcoming edges.
- unsigned Reg = MO.getReg();
if (Before) {
// Check whether Reg is defined by any terminator.
MachineBasicBlock::reverse_iterator It = MI;
auto REnd = MI.getParent()->rend();
for (; It != REnd && It->isTerminator(); ++It) {
- assert(!It->modifiesRegister(Reg, &TRI) &&
+ assert(!It->modifiesRegister(MO.getReg(), &TRI) &&
"copy insertion in middle of terminators not handled");
}
@@ -739,7 +738,8 @@ RegBankSelect::RepairingPlacement::Repai
for (MachineBasicBlock::iterator It = MI, End = MI.getParent()->end();
++It != End;)
// The machine verifier should reject this kind of code.
- assert(It->modifiesRegister(Reg, &TRI) && "Do not know where to split");
+ assert(It->modifiesRegister(MO.getReg(), &TRI) &&
+ "Do not know where to split");
// Split each outcoming edges.
MachineBasicBlock &Src = *MI.getParent();
for (auto &Succ : Src.successors())
More information about the llvm-commits
mailing list