[PATCH] D109855: [LoopPredication] Report changes correctly when attempting loop exit predication
Daniil Suchkov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 23 09:03:12 PDT 2021
DaniilSuchkov added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/LoopPredication.cpp:1129
+ // only `true`!
IP->moveBefore(WidenableBR);
if (MSSAU)
----------------
mkazantsev wrote:
> Why don't we invalidate SCEV cache after it? I think it's a bug.
It's good you noticed it! Though I can't say for sure why it's a bug and if it's a bug at all, I don't know SCEV as good as you do. Maybe you happen to have a testcase that would demonstrate that SCEV is in invalid state after this transformation? Anyway, given your knowledge of SCEV and this pass, you seem to be way better equipped for proving that this is a bug and fixing it, so maybe you can handle it?
Just to clarify: the problem of a missed SCEV update doesn't seem directly related to the problem of "this pass incorrectly reports that it preserved everything", so I hope you're not implying that this patch must have fixed this problem too.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109855/new/
https://reviews.llvm.org/D109855
More information about the llvm-commits
mailing list