[PATCH] D127960: [InstCombine] Push freeze through recurrence phi
Juneyoung Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 16 18:36:32 PDT 2022
aqjune added a comment.
> I suspect that this also obsoletes the CanonicalizeFreezeInLoops pass, and we can probably drop it.
ATM CanonicalizeFreezeInLoops targets patterns that are weakly related but different from this patch:
(1) It deals with freeze(add nsw (phi, 1)). (foldFreezeIntoRecurrence is called only for freeze(phi) in this patch)
(2) Freeze instructions that are not finally fed into the branch condition are hoisted as well - this is to allow successful SCEV analysis for all variables inside a loop
So immediately dropping it might not be possible.
================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:3803
+ if (StartBB->getFirstInsertionPt() == StartBB->end())
+ return nullptr; // Cannot insert into this block.
+
----------------
Not sure whether this can happen; when does this condition meet?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127960/new/
https://reviews.llvm.org/D127960
More information about the llvm-commits
mailing list