[PATCH] D92247: [IR][LoopRotate] avoid leaving phi with no operands (PR48296)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 27 13:52:28 PST 2020


spatel added a comment.

In D92247#2420756 <https://reviews.llvm.org/D92247#2420756>, @lebedev.ri wrote:

> I think the bug is downstream - `removePredecessor()`'s default for `KeepOneInputPHIs` is `false`,
> so someone explicitly asked for this behaviour.

For this example, we're getting to removePredecessor() from llvm::changeToUnreachable(), where `PreserveLCSSA` is set and becomes `KeepOneInputPHIs`. If I change that to ignore `PreserveLCSSA`, then we get a different crash. So there's apparently some valid reason to keep the behavior where the phi ends up with 1 predecessor vs. ends up with 0 predecessors.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92247/new/

https://reviews.llvm.org/D92247



More information about the llvm-commits mailing list