diff options
| author | Chris Lattner <sabre@nondot.org> | 2002-09-11 01:21:29 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2002-09-11 01:21:29 +0000 |
| commit | b9d9e0ff8d4c5c505212448109bf5d2825bde9c5 (patch) | |
| tree | fab69a4559ca37b5c42a7abeec662b8483a3956e /llvm/lib/Transforms/LevelRaise.cpp | |
| parent | 236c129844ba239227ea5e96b7ca8c05f54f515e (diff) | |
| download | bcm5719-llvm-b9d9e0ff8d4c5c505212448109bf5d2825bde9c5.tar.gz bcm5719-llvm-b9d9e0ff8d4c5c505212448109bf5d2825bde9c5.zip | |
- Change getelementptr instruction to use long indexes instead of uint
indexes for sequential types.
llvm-svn: 3681
Diffstat (limited to 'llvm/lib/Transforms/LevelRaise.cpp')
| -rw-r--r-- | llvm/lib/Transforms/LevelRaise.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/LevelRaise.cpp b/llvm/lib/Transforms/LevelRaise.cpp index 92f2f79381c..fd32251bea8 100644 --- a/llvm/lib/Transforms/LevelRaise.cpp +++ b/llvm/lib/Transforms/LevelRaise.cpp @@ -323,7 +323,7 @@ static bool PeepholeOptimize(BasicBlock *BB, BasicBlock::iterator &BI) { // Build the index vector, full of all zeros std::vector<Value*> Indices; - Indices.push_back(ConstantUInt::get(Type::UIntTy, 0)); + Indices.push_back(ConstantSInt::get(Type::LongTy, 0)); while (CurCTy && !isa<PointerType>(CurCTy)) { if (const StructType *CurSTy = dyn_cast<StructType>(CurCTy)) { // Check for a zero element struct type... if we have one, bail. @@ -338,7 +338,7 @@ static bool PeepholeOptimize(BasicBlock *BB, BasicBlock::iterator &BI) { } // Insert a zero to index through this type... - Indices.push_back(ConstantUInt::get(CurCTy->getIndexType(), 0)); + Indices.push_back(Constant::getNullValue(CurCTy->getIndexType())); // Did we find what we're looking for? if (ElTy->isLosslesslyConvertableTo(DestPointedTy)) break; |

