Fix bug: 2002-10-02-SignExtensionProblem.ll

llvm-svn: 4017
This commit is contained in:
Chris Lattner 2002-10-02 18:53:14 +00:00
parent bff2adb2a4
commit 0f5346d743
1 changed files with 2 additions and 3 deletions

View File

@ -147,15 +147,14 @@ const Type *ConvertableToGEP(const Type *Ty, Value *OffsetVal,
if (ScaleAmt && ScaleAmt != 1) {
// If we have to scale up our index, do so now
Value *ScaleAmtVal = ConstantSInt::get(Type::LongTy,
(unsigned)ScaleAmt);
Value *ScaleAmtVal = ConstantSInt::get(Type::LongTy, ScaleAmt);
Expr.Var = BinaryOperator::create(Instruction::Mul, Expr.Var,
ScaleAmtVal,
Expr.Var->getName()+"-scale",*BI);
}
if (Index) { // Add an offset to the index
Value *IndexAmt = ConstantSInt::get(Type::LongTy, (unsigned)Index);
Value *IndexAmt = ConstantSInt::get(Type::LongTy, Index);
Expr.Var = BinaryOperator::create(Instruction::Add, Expr.Var,
IndexAmt,
Expr.Var->getName()+"-offset",