[llvm-commits] CVS: llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp
Chris Lattner
lattner at cs.uiuc.edu
Fri May 30 00:27:01 PDT 2003
Changes in directory llvm/lib/Transforms/Scalar:
ScalarReplAggregates.cpp updated: 1.3 -> 1.4
---
Log message:
Fix bug: ScalarRepl/2003-05-30-MultiLevel.ll
---
Diffs of the changes:
Index: llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp
diff -u llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.3 llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.4
--- llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.3 Thu May 29 23:15:41 2003
+++ llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp Fri May 30 00:26:30 2003
@@ -123,12 +123,12 @@
// 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.
More information about the llvm-commits
mailing list