Don't create ConstantInts with pointer type. This fixes a

regression in 403.gcc in PIC_CODEGEN=1 and DISABLE_LTO=1
mode.

llvm-svn: 69344
This commit is contained in:
Dan Gohman 2009-04-17 02:02:52 +00:00
parent eaa28f7e18
commit d2d6fd806c
1 changed files with 1 additions and 1 deletions

View File

@ -2117,7 +2117,7 @@ ICmpInst *LoopStrengthReduce::ChangeCompareStride(Loop *L, ICmpInst *Cond,
NewOffset = TyBits == NewTyBits NewOffset = TyBits == NewTyBits
? SE->getMulExpr(CondUse->Offset, ? SE->getMulExpr(CondUse->Offset,
SE->getConstant(ConstantInt::get(CmpTy, Scale))) SE->getConstant(ConstantInt::get(CmpTy, Scale)))
: SE->getConstant(ConstantInt::get(NewCmpTy, : SE->getConstant(ConstantInt::get(IntegerType::get(NewTyBits),
cast<SCEVConstant>(CondUse->Offset)->getValue()->getSExtValue()*Scale)); cast<SCEVConstant>(CondUse->Offset)->getValue()->getSExtValue()*Scale));
break; break;
} }