From: Max Kazantsev Date: Wed, 23 Nov 2022 08:13:40 +0000 (+0700) Subject: [SCEV] Fix wrong initialization of MaxNotTaken X-Git-Tag: upstream/17.0.6~26662 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d3e21ba550ba1351bc145c72a0b7342c622d108e;p=platform%2Fupstream%2Fllvm.git [SCEV] Fix wrong initialization of MaxNotTaken I'm not sure why, but since this code was introduced back in 2019, this variable used wrong value to initialize. Somehow it just worked, but needs to be fixed. Differential Revision: https://reviews.llvm.org/D138549 Reviewed By: fhahn --- diff --git a/llvm/include/llvm/Analysis/ScalarEvolution.h b/llvm/include/llvm/Analysis/ScalarEvolution.h index 47fddb3..fa61583 100644 --- a/llvm/include/llvm/Analysis/ScalarEvolution.h +++ b/llvm/include/llvm/Analysis/ScalarEvolution.h @@ -1367,7 +1367,7 @@ private: const SCEV *MaxNotTaken, const SmallPtrSet &Predicates) : ExitingBlock(ExitingBlock), ExactNotTaken(ExactNotTaken), - MaxNotTaken(ExactNotTaken), Predicates(Predicates) {} + MaxNotTaken(MaxNotTaken), Predicates(Predicates) {} bool hasAlwaysTruePredicate() const { return Predicates.empty();