mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-02 10:33:53 +00:00
Fix bug: ScalarRepl/2003-05-30-MultiLevel.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6428 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fa4c20dd92
commit
261d686737
@ -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…
x
Reference in New Issue
Block a user