mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-06 04:09:04 +00:00
Fix bug: IndVarSimplify/2003-04-16-ExprAnalysis.ll
llvm-svn: 5795
This commit is contained in:
parent
f8b4bd0dc3
commit
23615ca1b5
@ -244,11 +244,9 @@ ExprType ClassifyExpression(Value *Expr) {
|
||||
case Value::ArgumentVal: // nothing known, return variable itself
|
||||
return Expr;
|
||||
case Value::ConstantVal: // Constant value, just return constant
|
||||
Constant *CPV = cast<Constant>(Expr);
|
||||
if (CPV->getType()->isInteger()) { // It's an integral constant!
|
||||
ConstantInt *CPI = cast<ConstantInt>(Expr);
|
||||
if (ConstantInt *CPI = dyn_cast<ConstantInt>(cast<Constant>(Expr)))
|
||||
// It's an integral constant!
|
||||
return ExprType(CPI->isNullValue() ? 0 : CPI);
|
||||
}
|
||||
return Expr;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user