[Bug][LoopUnroll] Invalid LoopInfo used during LoopUnroll
LoopUnroll did not update LoopInfo completely correctly, and invalid loopinfo was passed into simplifyLoopAfterUnroll() during the transformation.
The way to reproduce the bug: put a call to LI.verify(DT) right before the call of simplifyLoopAfterUnroll(L, !CompletelyUnroll && ULO.Count > 1, LI, SE, DT, AC, TTI, AA) inside llvm::UnrollLoop() in llvm/lib/Transforms/Utils/LoopUnroll.cpp, then run check-llvm-transforms-loopunroll.
93 out of the 230 tests would fail likely all due to invalid loopinfo. Therefore, simplifyLoopAfterUnroll() was called with invalid loopinfo passed into it.
Related parent issue: https://github.com/llvm/llvm-project/issues/190682 Related sub-issue: https://github.com/llvm/llvm-project/issues/190671
Working on it for the fix.