This is the follow-up to D144199 and suggestion from D144045.
We make use of loop info explicit via InstCombine pass
parameter rather than semi-arbitrary via caching.
The only InstCombine transform that uses LoopInfo currently is
a GEP fold in visitGEPOfGEP(), so that shows up as a failure in
the dedicated test for the fold as well as several
LoopVectorizer tests that run extra passes.
I don't see any pass manager regression tests that actually
check for pass options, but based on the LoopVectorizer test
expectations, I assumed that we want to use loop analysis on
all of the InstCombine invocations following vectorization.
Co-authored-by: Sanjay Patel <spatel@rotateright.com>
Looks right: LoopVectorize requires LoopInfo and LoopUnroll, SROA will preserve it.