mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
ConstantFoldInstOperands can theoretically return null if it
didn't fold anything. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97049 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8f767d987f
commit
e177c9a9bc
@ -4226,14 +4226,15 @@ const SCEV *ScalarEvolution::computeSCEVAtScope(const SCEV *V, const Loop *L) {
|
||||
}
|
||||
}
|
||||
|
||||
Constant *C;
|
||||
Constant *C = 0;
|
||||
if (const CmpInst *CI = dyn_cast<CmpInst>(I))
|
||||
C = ConstantFoldCompareInstOperands(CI->getPredicate(),
|
||||
Operands[0], Operands[1], TD);
|
||||
else
|
||||
C = ConstantFoldInstOperands(I->getOpcode(), I->getType(),
|
||||
&Operands[0], Operands.size(), TD);
|
||||
return getSCEV(C);
|
||||
if (C)
|
||||
return getSCEV(C);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user