mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-01 09:18:30 +00:00
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
This commit is contained in:
parent
e33da36cbd
commit
827832c705
@ -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();
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user