Fix SingleSource/Benchmarks/McGill/chomp
authorChris Lattner <sabre@nondot.org>
Mon, 11 Oct 2004 04:07:27 +0000 (04:07 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 11 Oct 2004 04:07:27 +0000 (04:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16912 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ScalarEvolution.cpp

index 6a2bc714bbebf466b28fe23207211fa48b4dd16a..31c85172f8a864d77086a152f95b5025e59a691b 100644 (file)
@@ -1898,6 +1898,7 @@ SCEVHandle ScalarEvolutionsImpl::HowFarToZero(SCEV *V, const Loop *L) {
     //
     // Get the initial value for the loop.
     SCEVHandle Start = getSCEVAtScope(AddRec->getStart(), L->getParentLoop());
+    if (isa<SCEVCouldNotCompute>(Start)) return UnknownValue;
     SCEVHandle Step = AddRec->getOperand(1);
 
     Step = getSCEVAtScope(Step, L->getParentLoop());