diff options
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Analysis/StackSafetyAnalysis.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/lib/Analysis/StackSafetyAnalysis.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/llvm-project/llvm/lib/Analysis/StackSafetyAnalysis.cpp b/contrib/llvm-project/llvm/lib/Analysis/StackSafetyAnalysis.cpp index 73096eb4baef..76f195fedf31 100644 --- a/contrib/llvm-project/llvm/lib/Analysis/StackSafetyAnalysis.cpp +++ b/contrib/llvm-project/llvm/lib/Analysis/StackSafetyAnalysis.cpp @@ -263,6 +263,8 @@ ConstantRange StackSafetyLocalAnalysis::offsetFrom(Value *Addr, Value *Base) { const SCEV *AddrExp = SE.getTruncateOrZeroExtend(SE.getSCEV(Addr), PtrTy); const SCEV *BaseExp = SE.getTruncateOrZeroExtend(SE.getSCEV(Base), PtrTy); const SCEV *Diff = SE.getMinusSCEV(AddrExp, BaseExp); + if (isa<SCEVCouldNotCompute>(Diff)) + return UnknownRange; ConstantRange Offset = SE.getSignedRange(Diff); if (isUnsafe(Offset)) |