Signed shr by a constant is not the same as sdiv by 2^k
llvm-svn: 27395
This commit is contained in:
parent
e91e3bd874
commit
6b2c9748c3
|
@ -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));
|
||||
|
||||
|
|
Loading…
Reference in New Issue