[PATCH] D155255: [SCEV] Don't update the range value if empty
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 14 00:20:53 PDT 2023
nikic added inline comments.
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:6837
+ ConservativeResult = ConservativeResult.intersectWith(
+ {MinVal, MaxVal + 1}, RangeType);
+ }
----------------
It would be better to use `ConstantRange::getNonEmpty()` here.
================
Comment at: llvm/test/Transforms/LoopStrengthReduce/scev-operator-new.ll:24
+
+declare ptr @_Znam(i64)
----------------
Please add the test to llvm/test/Analysis/ScalarEvolution/malloc.ll, with the same testing approach used there.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155255/new/
https://reviews.llvm.org/D155255
More information about the llvm-commits
mailing list