LSR tests failing under new pass manager due to not being in LCSSA form

In an effort to turn on the new pass manager by default, I’ve been trying to make all lit tests pass when opt uses the new pass manager. (Change the default value of -enable-new-pm in opt.cpp to true to repro)

A good chunk of the remaining failures are some loop pass tests, mostly LSR, that are failing. The legacy PM does not by default run LCSSA before running loop passes, but the new PM does that. These tests are failing because the original test file is not in LCSSA form, so running LCSSA before something like -loop-reduce changes the input to LSR. This can be repro’d under the legacy PM by changing the test to also run -lcssa. One example is llvm/test/Transforms/LoopStrengthReduce/uglygep.ll (RUN: opt < %s -lcssa -loop-reduce -S | FileCheck %s).

Any thoughts on how to fix these 30-35 tests? Manually convert them to LCSSA form and update the CHECK lines? Seems tricky, especially for somebody without much experience with these passes. Some of these do use update_test_checks, but some do not.
Another option is to add an option to disable running LCSSA, but that doesn’t seem right.

Maybe you’ve already found a solution or gone ahead with the test updates, but I think it’s OK to force some of the tests to run under the old PM if they are difficult to update.