Fix bug: ScalarRepl/2003-05-30-MultiLevel.ll
llvm-svn: 6428
This commit is contained in:
parent
0eef7c0d10
commit
38d88c07f4
|
@ -123,12 +123,12 @@ bool SROA::runOnFunction(Function &F) {
|
|||
// expanded itself once the worklist is rerun.
|
||||
//
|
||||
std::string OldName = GEPI->getName(); // Steal the old name...
|
||||
std::vector<Value*> NewArgs;
|
||||
NewArgs.push_back(Constant::getNullValue(Type::LongTy));
|
||||
NewArgs.insert(NewArgs.end(), GEPI->op_begin()+3, GEPI->op_end());
|
||||
GEPI->setName("");
|
||||
RepValue =
|
||||
new GetElementPtrInst(AllocaToUse,
|
||||
std::vector<Value*>(GEPI->op_begin()+3,
|
||||
GEPI->op_end()),
|
||||
OldName, GEPI);
|
||||
new GetElementPtrInst(AllocaToUse, NewArgs, OldName, GEPI);
|
||||
}
|
||||
|
||||
// Move all of the users over to the new GEP.
|
||||
|
|
Loading…
Reference in New Issue