Fix a bug in yesterdays checkins which broke siod. siod is a great testcase! :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12659 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-04-05 16:02:41 +00:00
parent 15a76c0b35
commit 548f47efb0

View File

@ -2422,10 +2422,10 @@ Instruction *InstCombiner::visitGetElementPtrInst(GetElementPtrInst &GEP) {
}
Sum = BinaryOperator::create(Instruction::Add, SO1, GO1,
GEP.getOperand(0)->getName()+".sum", &GEP);
WorkList.push_back(cast<Instruction>(Sum));
}
GEP.setOperand(0, SrcGEPOperands[0]);
GEP.setOperand(1, Sum);
WorkList.push_back(cast<Instruction>(Sum));
return &GEP;
} else if (isa<Constant>(*GEP.idx_begin()) &&
cast<Constant>(*GEP.idx_begin())->isNullValue() &&