diff options
author | Chris Lattner <sabre@nondot.org> | 2004-02-22 17:05:38 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-02-22 17:05:38 +0000 |
commit | 827832c705fb5dae4929fc139c3ff828a61d3331 (patch) | |
tree | 473d9941ee95e15d6e91bcf975208f2244ab82fa /lib/Target/X86/InstSelectSimple.cpp | |
parent | e33da36cbd138b2921057da966275a76c8792235 (diff) |
Fix bug in previous checkout: leave the iterator at the first instruction
AFTER the GEP that was emitted. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11712 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/InstSelectSimple.cpp')
-rw-r--r-- | lib/Target/X86/InstSelectSimple.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Target/X86/InstSelectSimple.cpp b/lib/Target/X86/InstSelectSimple.cpp index 97f14d21ea..4aced20f95 100644 --- a/lib/Target/X86/InstSelectSimple.cpp +++ b/lib/Target/X86/InstSelectSimple.cpp @@ -212,7 +212,7 @@ namespace { /// emitGEPOperation - Common code shared between visitGetElementPtrInst and /// constant expression GEP support. /// - void emitGEPOperation(MachineBasicBlock *BB, MachineBasicBlock::iterator&IP, + void emitGEPOperation(MachineBasicBlock *BB, MachineBasicBlock::iterator IP, Value *Src, User::op_iterator IdxBegin, User::op_iterator IdxEnd, unsigned TargetReg); @@ -2202,13 +2202,12 @@ void ISel::visitVAArgInst(VAArgInst &I) { void ISel::visitGetElementPtrInst(GetElementPtrInst &I) { unsigned outputReg = getReg(I); - MachineBasicBlock::iterator MI = BB->end(); - emitGEPOperation(BB, MI, I.getOperand(0), + emitGEPOperation(BB, BB->end(), I.getOperand(0), I.op_begin()+1, I.op_end(), outputReg); } void ISel::emitGEPOperation(MachineBasicBlock *MBB, - MachineBasicBlock::iterator &IP, + MachineBasicBlock::iterator IP, Value *Src, User::op_iterator IdxBegin, User::op_iterator IdxEnd, unsigned TargetReg) { const TargetData &TD = TM.getTargetData(); |