diff options
| author | Chris Lattner <sabre@nondot.org> | 2002-02-14 22:21:40 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2002-02-14 22:21:40 +0000 |
| commit | 4ed4caf44a438382b1b7c44e3dc97a8a32e6764c (patch) | |
| tree | bfd62b9a33ff94adb5777b5aa972aae2b90a3698 /llvm | |
| parent | 18786d45b2f794b0953e24031736d7073caa2f3c (diff) | |
| download | bcm5719-llvm-4ed4caf44a438382b1b7c44e3dc97a8a32e6764c.tar.gz bcm5719-llvm-4ed4caf44a438382b1b7c44e3dc97a8a32e6764c.zip | |
Bug fix for test/Regression/Other/2002-02-14-LevelRaiseBadAssert.ll
llvm-svn: 1767
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/Transforms/ExprTypeConvert.cpp | 3 | ||||
| -rw-r--r-- | llvm/lib/Transforms/TransformInternals.cpp | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/ExprTypeConvert.cpp b/llvm/lib/Transforms/ExprTypeConvert.cpp index 5975a21ff3d..d716bca76de 100644 --- a/llvm/lib/Transforms/ExprTypeConvert.cpp +++ b/llvm/lib/Transforms/ExprTypeConvert.cpp @@ -307,8 +307,7 @@ bool ExpressionConvertableToType(Value *V, const Type *Ty, // std::vector<Value*> Indices; const Type *ElTy = ConvertableToGEP(PTy, I->getOperand(1), Indices); - if (ElTy) { - assert(ElTy == PVTy && "Internal error, setup wrong!"); + if (ElTy == PVTy) { if (!ExpressionConvertableToType(I->getOperand(0), PointerType::get(ElTy), CTMap)) return false; // Can't continue, ExConToTy might have polluted set! diff --git a/llvm/lib/Transforms/TransformInternals.cpp b/llvm/lib/Transforms/TransformInternals.cpp index 6b42d0c7667..f773a1c473e 100644 --- a/llvm/lib/Transforms/TransformInternals.cpp +++ b/llvm/lib/Transforms/TransformInternals.cpp @@ -155,6 +155,7 @@ const Type *ConvertableToGEP(const Type *Ty, Value *OffsetVal, int Val = getConstantValue(Expr.Scale); if (Val < 0) return false; // Don't mess with negative scales Scale = (unsigned)Val; + if (Scale == 1) Scale = 0; // No interesting scale if *1 } // Loop over the Scale and Offset values, filling in the Indices vector for |

