[PATCH] D138549: [SCEV] Fix wrong initialization of MaxNotTaken
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 23 00:56:18 PST 2022
mkazantsev created this revision.
mkazantsev added reviewers: reames, lebedev.ri, fhahn, nikic.
Herald added a project: All.
mkazantsev requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
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.
https://reviews.llvm.org/D138549
Files:
llvm/include/llvm/Analysis/ScalarEvolution.h
Index: llvm/include/llvm/Analysis/ScalarEvolution.h
===================================================================
--- llvm/include/llvm/Analysis/ScalarEvolution.h
+++ llvm/include/llvm/Analysis/ScalarEvolution.h
@@ -1367,7 +1367,7 @@
const SCEV *MaxNotTaken,
const SmallPtrSet<const SCEVPredicate *, 4> &Predicates)
: ExitingBlock(ExitingBlock), ExactNotTaken(ExactNotTaken),
- MaxNotTaken(ExactNotTaken), Predicates(Predicates) {}
+ MaxNotTaken(MaxNotTaken), Predicates(Predicates) {}
bool hasAlwaysTruePredicate() const {
return Predicates.empty();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138549.477401.patch
Type: text/x-patch
Size: 654 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221123/44b99e5f/attachment.bin>
More information about the llvm-commits
mailing list