[PATCH] D104702: [LSR] Filter out zero factors. PR50765
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 22 16:01:10 PDT 2021
reames added a comment.
LGTM to me as well.
================
Comment at: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:2713
if (const SCEVConstant *Factor =
dyn_cast_or_null<SCEVConstant>(getExactSDiv(NewStride, OldStride,
SE, true))) {
----------------
Not a problem with this patch, but dang this code is suspicious. It appears to be wanting to check whether one factor divides another, but a) it's *asserting* the divide is exact, and b) it's discarding any remainder. That probably wasn't what was actually wanted here...
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104702/new/
https://reviews.llvm.org/D104702
More information about the llvm-commits
mailing list