[PATCH] D127960: [InstCombine] Push freeze through recurrence phi
Juneyoung Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 17 01:08:41 PDT 2022
aqjune added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:3803
+ if (StartBB->getFirstInsertionPt() == StartBB->end())
+ return nullptr; // Cannot insert into this block.
+
----------------
nlopes wrote:
> aqjune wrote:
> > Not sure whether this can happen; when does this condition meet?
> I was also wondering about that, but I guess it may happen with malformed BBs (e.g., with just PHIs but no terminator). Unreachable BBs are allowed to be malformed in LLVM IR (which is a bit unfortunate).
Oh okay, it makes sense to me.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127960/new/
https://reviews.llvm.org/D127960
More information about the llvm-commits
mailing list