forked from OSchip/llvm-project
Fix bug: IndVarSimplify/2003-04-16-ExprAnalysis.ll
llvm-svn: 5795
This commit is contained in:
parent
459b9e2485
commit
dee5f75221
|
@ -244,11 +244,9 @@ ExprType ClassifyExpression(Value *Expr) {
|
||||||
case Value::ArgumentVal: // nothing known, return variable itself
|
case Value::ArgumentVal: // nothing known, return variable itself
|
||||||
return Expr;
|
return Expr;
|
||||||
case Value::ConstantVal: // Constant value, just return constant
|
case Value::ConstantVal: // Constant value, just return constant
|
||||||
Constant *CPV = cast<Constant>(Expr);
|
if (ConstantInt *CPI = dyn_cast<ConstantInt>(cast<Constant>(Expr)))
|
||||||
if (CPV->getType()->isInteger()) { // It's an integral constant!
|
// It's an integral constant!
|
||||||
ConstantInt *CPI = cast<ConstantInt>(Expr);
|
|
||||||
return ExprType(CPI->isNullValue() ? 0 : CPI);
|
return ExprType(CPI->isNullValue() ? 0 : CPI);
|
||||||
}
|
|
||||||
return Expr;
|
return Expr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue