summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-03-21 23:02:37 +0000
committerChris Lattner <sabre@nondot.org>2002-03-21 23:02:37 +0000
commitb39971dfa87c6b59bce773b6d82b228c50acb08d (patch)
treec7361cc8e99961e5b8ba42aa00eee809947949a4 /llvm/lib
parent14a9a207711845a9764b5548d798f7d21a7de8cd (diff)
downloadbcm5719-llvm-b39971dfa87c6b59bce773b6d82b228c50acb08d.tar.gz
bcm5719-llvm-b39971dfa87c6b59bce773b6d82b228c50acb08d.zip
Fix bug test/Regression/Transforms/LevelRaise/2002-03-21-MissedRaise3.ll
llvm-svn: 1943
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/ExprTypeConvert.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/ExprTypeConvert.cpp b/llvm/lib/Transforms/ExprTypeConvert.cpp
index 3c3e27161b4..cd76bdbf1f3 100644
--- a/llvm/lib/Transforms/ExprTypeConvert.cpp
+++ b/llvm/lib/Transforms/ExprTypeConvert.cpp
@@ -71,7 +71,7 @@ static bool MallocConvertableToType(MallocInst *MI, const Type *Ty,
unsigned OldTypeSize = TD.getTypeSize(MI->getType()->getElementType());
// Must have a scale or offset to analyze it...
- if (!Expr.Offset && !Expr.Scale) return false;
+ if (!Expr.Offset && !Expr.Scale && OldTypeSize == 1) return false;
// Get the offset and scale of the allocation...
int OffsetVal = Expr.Offset ? getConstantValue(Expr.Offset) : 0;
OpenPOWER on IntegriCloud