mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-29 10:32:47 +00:00
Fix bug: IndVarSimplify/2003-04-16-ExprAnalysis.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5795 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
843c80f7a3
commit
ac7ad68cc0
@ -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…
Reference in New Issue
Block a user