[PATCH] D129653: isInductionPHI - Add some safety checks
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 13 09:29:15 PDT 2022
fhahn requested changes to this revision.
fhahn added inline comments.
This revision now requires changes to proceed.
================
Comment at: llvm/lib/Analysis/IVDescriptors.cpp:1509
+
+ if (!Phi)
+ return false;
----------------
This should never be called with `Phi` being null.
================
Comment at: llvm/lib/Analysis/IVDescriptors.cpp:1537
+ if (!(AR->getLoop()->getLoopPreheader()))
+ return false;
----------------
This is overly restrictive, whether the loop has a pre-header or not shouldn't impact whether a phi is an induction or now.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129653/new/
https://reviews.llvm.org/D129653
More information about the llvm-commits
mailing list