diff options
author | Chris Lattner <sabre@nondot.org> | 2002-08-22 22:48:32 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-08-22 22:48:32 +0000 |
commit | 8e4fc2598dbadd7e3c7c22367d6b7ffae3107851 (patch) | |
tree | 5e48c0ae90c4b4777fec4463c15d048fc772cfe4 /lib/Transforms/ExprTypeConvert.cpp | |
parent | f150b9d984c7a8e3cf7c77bb676731e7abf8359f (diff) |
*** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3483 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/ExprTypeConvert.cpp')
-rw-r--r-- | lib/Transforms/ExprTypeConvert.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/Transforms/ExprTypeConvert.cpp b/lib/Transforms/ExprTypeConvert.cpp index fbb992bfd2..a84f1d0f5e 100644 --- a/lib/Transforms/ExprTypeConvert.cpp +++ b/lib/Transforms/ExprTypeConvert.cpp @@ -216,12 +216,6 @@ bool ExpressionConvertableToType(Value *V, const Type *Ty, case Instruction::Load: { LoadInst *LI = cast<LoadInst>(I); - if (LI->hasIndices() && !AllIndicesZero(LI)) { - // We can't convert a load expression if it has indices... unless they are - // all zero. - return false; - } - if (!ExpressionConvertableToType(LI->getPointerOperand(), PointerType::get(Ty), CTMap)) return false; @@ -403,7 +397,6 @@ Value *ConvertExpressionToType(Value *V, const Type *Ty, ValueMapCache &VMC) { case Instruction::Load: { LoadInst *LI = cast<LoadInst>(I); - assert(!LI->hasIndices() || AllIndicesZero(LI)); Res = new LoadInst(Constant::getNullValue(PointerType::get(Ty)), Name); VMC.ExprMap[I] = Res; @@ -666,9 +659,6 @@ static bool OperandConvertableToType(User *U, Value *V, const Type *Ty, if (const PointerType *PT = dyn_cast<PointerType>(Ty)) { LoadInst *LI = cast<LoadInst>(I); - if (LI->hasIndices() && !AllIndicesZero(LI)) - return false; - const Type *LoadedTy = PT->getElementType(); // They could be loading the first element of a composite type... @@ -691,7 +681,6 @@ static bool OperandConvertableToType(User *U, Value *V, const Type *Ty, case Instruction::Store: { StoreInst *SI = cast<StoreInst>(I); - if (SI->hasIndices()) return false; if (V == I->getOperand(0)) { ValueTypeCache::iterator CTMI = CTMap.find(I->getOperand(1)); |