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 | 106ff4551c9c35bb6bcbdd6ca50543b100a7658e (patch) | |
tree | ecc29951a8648a0ca42426f152de89d8d6127539 /lib/Transforms/LevelRaise.cpp | |
parent | 562219de55f007b0dbd3aeffad888e530a8faad4 (diff) |
- Change getelementptr instruction to use long indexes instead of uint
indexes for sequential types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3681 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/LevelRaise.cpp')
-rw-r--r-- | lib/Transforms/LevelRaise.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/LevelRaise.cpp b/lib/Transforms/LevelRaise.cpp index 92f2f79381..fd32251bea 100644 --- a/lib/Transforms/LevelRaise.cpp +++ b/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; |