diff options
author | Chris Lattner <sabre@nondot.org> | 2003-05-30 05:26:30 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-05-30 05:26:30 +0000 |
commit | 261d686737989a8d7eff0b0f405515a1565303d9 (patch) | |
tree | 39c433d80a004cd1ab31bf0de11b623339a2df18 | |
parent | fa4c20dd92cbfdae46841914430b43318511ed12 (diff) |
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
-rw-r--r-- | lib/Transforms/Scalar/ScalarReplAggregates.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/lib/Transforms/Scalar/ScalarReplAggregates.cpp index 4a69522631..2ac6ce643c 100644 --- a/lib/Transforms/Scalar/ScalarReplAggregates.cpp +++ b/lib/Transforms/Scalar/ScalarReplAggregates.cpp @@ -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. |