[llvm] c8cd7e2 - [ARM] Remove MI variable aliasing. NFC
David Green via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 9 10:18:57 PST 2020
Author: David Green
Date: 2020-11-09T18:18:43Z
New Revision: c8cd7e2bbf7e124ed09da2b27e09dd30e3562e46
URL: https://github.com/llvm/llvm-project/commit/c8cd7e2bbf7e124ed09da2b27e09dd30e3562e46
DIFF: https://github.com/llvm/llvm-project/commit/c8cd7e2bbf7e124ed09da2b27e09dd30e3562e46.diff
LOG: [ARM] Remove MI variable aliasing. NFC
This was accidentally using the same name for two different variables in
the same line. Whilst it seems to work for some compilers, others have
trouble and it is probably not a fantastic idea.
Added:
Modified:
llvm/lib/Target/ARM/MVEVPTBlockPass.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/ARM/MVEVPTBlockPass.cpp b/llvm/lib/Target/ARM/MVEVPTBlockPass.cpp
index 232db6124f09..7b8a33d046fa 100644
--- a/llvm/lib/Target/ARM/MVEVPTBlockPass.cpp
+++ b/llvm/lib/Target/ARM/MVEVPTBlockPass.cpp
@@ -273,10 +273,10 @@ bool MVEVPTBlock::InsertVPTBlocks(MachineBasicBlock &Block) {
// We need to remove any kill flags between the original VCMP and the new
// insertion point.
- for (MachineInstr &MI :
+ for (MachineInstr &MII :
make_range(VCMP->getIterator(), MI->getIterator())) {
- MI.clearRegisterKills(VCMP->getOperand(1).getReg(), TRI);
- MI.clearRegisterKills(VCMP->getOperand(2).getReg(), TRI);
+ MII.clearRegisterKills(VCMP->getOperand(1).getReg(), TRI);
+ MII.clearRegisterKills(VCMP->getOperand(2).getReg(), TRI);
}
VCMP->eraseFromParent();
More information about the llvm-commits
mailing list