[PATCH] D58045: [IndVars] Fix corner case with unreachable Phi inputs. PR40454
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 11 04:04:47 PST 2019
mkazantsev created this revision.
mkazantsev added reviewers: cszide, spatel, andreadb, sanjoy, skatkov.
Logic in `getInsertPointForUses` doesn't account for a corner case when `Def` only
comes to a Phi user from unreachable blocks. In this case, the incoming value may
be arbitrary (and not even available in the input block) and break the loop-related
invariants that are asserted below.
In fact, if we encounter this situation, no IR modification is needed. This Phi will be
simplified away with nearest cleanup.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4006 bytes
Desc: not available
More information about the llvm-commits