diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2019-01-08 12:54:26 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2019-01-08 12:54:26 +0000 |
commit | a480523ce90651af0998e8a17d3fd7d0147a9e38 (patch) | |
tree | 5f13252d9c453276721b1f4c20d01166eca8ad07 /llvm/lib | |
parent | 8e55ddef8c141fd204fcbfefafff70e3b150efd7 (diff) | |
download | bcm5719-llvm-a480523ce90651af0998e8a17d3fd7d0147a9e38.tar.gz bcm5719-llvm-a480523ce90651af0998e8a17d3fd7d0147a9e38.zip |
[GlobalISel] Fix unused variable warning in Release builds.
llvm-svn: 350618
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp b/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp index b1e371dacd2..dcc8b7cc23c 100644 --- a/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp +++ b/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp @@ -714,14 +714,13 @@ RegBankSelect::RepairingPlacement::RepairingPlacement( // - 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::RepairingPlacement( 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()) |