This change allows sinking defs from loop preheader with PHI-use into loop body. Loop sink can now see through PHI-use and select incoming blocks of value being used as candidate sink destination.
It makes loop sink more effective so more LICM can be undone if proven unprofitable with profile info. It addresses the motivating case in D87551, without resorting to profile guided LICM which breaks canonicalization.
Might it make sense to move the phi node handling before this check? It should be fine to sink an instruction that is used outside the loop into the corresponding exiting block (i.e. the predecessor of the lcssa phi node), and this may be profitable if the exiting block is cold.