Signed shr by a constant is not the same as sdiv by 2^k

llvm-svn: 27395
This commit is contained in:
Chris Lattner 2006-04-04 06:11:42 +00:00
parent e91e3bd874
commit 6b2c9748c3
1 changed files with 0 additions and 9 deletions

View File

@ -1374,15 +1374,6 @@ SCEVHandle ScalarEvolutionsImpl::createSCEV(Value *V) {
}
break;
case Instruction::Shr:
if (ConstantUInt *SA = dyn_cast<ConstantUInt>(I->getOperand(1)))
if (V->getType()->isSigned()) {
Constant *X = ConstantInt::get(V->getType(), 1);
X = ConstantExpr::getShl(X, SA);
return SCEVSDivExpr::get(getSCEV(I->getOperand(0)), getSCEV(X));
}
break;
case Instruction::Cast:
return createNodeForCast(cast<CastInst>(I));