In commit r373341 it was noted that MachineSink didn't preserve CFG and
MachineDominatorTree (MDT) even if it claimed it did. That was fixed in
the same commit by not claiming to preserve them anymore.
However, MachineSink still claims it preserves MachineLoopInfo (MLI),
but since MLI uses MDT I strongly suspect that when MDT goes invalid,
MLI should too.
There is also a minor discussion about this in
This patch now fixes that by changing MachineSink so it doesn't claim to
preserve MLI anymore.
I ran into this when debugging odd MLI crashes in my out-of-tree
target after r373341 so unfortunately I've no idea if it's possible to
reproduce it for in-tree targets.