summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-08-12 05:41:39 +0000
committerChris Lattner <sabre@nondot.org>2006-08-12 05:41:39 +0000
commit167ea3eb5f9086c0969933adbda0d07fff6beb02 (patch)
treec946ebab97b93d502edfb17743c3fb5e7ad9e9f8 /llvm/lib/CodeGen
parentf18b396cc20146b2d98c29b0380ba021cdf34a1e (diff)
downloadbcm5719-llvm-167ea3eb5f9086c0969933adbda0d07fff6beb02.tar.gz
bcm5719-llvm-167ea3eb5f9086c0969933adbda0d07fff6beb02.zip
Fix an obvious bug, noticed by inspection. No current targets trigger this.
llvm-svn: 29648
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/PHIElimination.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/PHIElimination.cpp b/llvm/lib/CodeGen/PHIElimination.cpp
index ffbae2a7ff7..fef833cc19f 100644
--- a/llvm/lib/CodeGen/PHIElimination.cpp
+++ b/llvm/lib/CodeGen/PHIElimination.cpp
@@ -103,9 +103,9 @@ bool PNE::EliminatePHINodes(MachineFunction &MF, MachineBasicBlock &MBB) {
/// use of the specified register.
static bool InstructionUsesRegister(MachineInstr *MI, unsigned SrcReg) {
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i)
- if (MI->getOperand(0).isRegister() &&
- MI->getOperand(0).getReg() == SrcReg &&
- MI->getOperand(0).isUse())
+ if (MI->getOperand(i).isRegister() &&
+ MI->getOperand(i).getReg() == SrcReg &&
+ MI->getOperand(i).isUse())
return true;
return false;
}
OpenPOWER on IntegriCloud