[PATCH] D118558: [IVDescriptors] Support FOR where we have multiple sink pointed
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 31 12:10:44 PST 2022
fhahn added reviewers: Ayal, spatel.
fhahn added a comment.
Thanks for the patch, response inline.
================
Comment at: llvm/lib/Analysis/IVDescriptors.cpp:932
+ return true;
+ }
----------------
I think this handles the case where Previous doesn't come before LastPrev incorrectly. I added an additional test that crashes with the current version of the patch (02ee3fbff816).
To start with, you should be able to use `return Previous->comesBefore(LastPrev);` here. The reasoning is that if Previous comes before LastPrev, `SinkCandidate` already gets sunk after `Previous`, so there's nothing to do here.
I put up a follow-up patch (D118642), that should handle the other case correctly.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118558/new/
https://reviews.llvm.org/D118558
More information about the llvm-commits
mailing list