r286389 updates UP.Count unconditionally when considering complete unroll of loop with compile-time known TripCount.
This can overwrite UP.Count retrieved by getUnrollingPreferences().
Will it work if we put UP.Count change under FullUnrollTripCount condition?
This issue was found in our in-house branch with custom TTI::getUnrollingPreferences()... not easy to produce a test case.
It looks like no one from trunk targets has UP.Count set in Unroll Preferences. So to add a test we'll need to add an option setting UP.Count default.
LGTM if all tests are passed.