[PATCH] D92247: [IR][LoopRotate] avoid leaving phi with no operands (PR48296)
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 30 04:35:02 PST 2020
spatel added inline comments.
================
Comment at: llvm/lib/IR/BasicBlock.cpp:333
for (PHINode &Phi : make_early_inc_range(phis())) {
- Phi.removeIncomingValue(Pred, !KeepOneInputPHIs);
+ Phi.removeIncomingValue(Pred);
if (KeepOneInputPHIs)
----------------
foad wrote:
> FYI I tried this as part of D80206 but had to revert because of https://bugs.llvm.org/show_bug.cgi?id=46343.
Hmm...I tried the test case from that report with this patch, and I don't see crashing. D80206 was bigger than this change, so something else might be needed to trigger the bug. It's also possible that jump-threading got better about ignoring dead code?
If there are no objections, I think we should make this change just to make things simpler. I can look at relaxing the assert as a next step.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92247/new/
https://reviews.llvm.org/D92247
More information about the llvm-commits
mailing list