summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-05-30 05:26:30 +0000
committerChris Lattner <sabre@nondot.org>2003-05-30 05:26:30 +0000
commit38d88c07f418ec227d98f715f27ea8706c1027fc (patch)
treea0f0676d35ead45f53645b11ce75fc920e74781f /llvm/lib/Transforms/Scalar
parent0eef7c0d1066727931a621658c9f07af6e4c400b (diff)
downloadbcm5719-llvm-38d88c07f418ec227d98f715f27ea8706c1027fc.tar.gz
bcm5719-llvm-38d88c07f418ec227d98f715f27ea8706c1027fc.zip
Fix bug: ScalarRepl/2003-05-30-MultiLevel.ll
llvm-svn: 6428
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
-rw-r--r--llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp
index 4a695226318..2ac6ce643c0 100644
--- a/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud