This is a patch that should go on top of D58375 which addresses/fixes tests that fail under new PM with -O0.
Current reasons for fixes (from other child patches attached to this one):
- Pass false to the new PM AlwaysInliner to prevent emission of lifetime start/end intrinsics.
- Add -fno-experimental-new-pass-manager to tests that use -O (but did not specify a number)
- Add an AssumptionCache callback to the InlineFuntionInfo used for the AlwaysInlinerPass to match codegen of the AlwaysInlinerLegacyPass to generate llvm.assume for -O0 tests.
- Some tests explicitly test for cases between both PMs but not all of the legacy PM ones specify -fno-experimental-new-pass-manager.
- Some New PM debug pass manager output is different from that of the legacy PM. Added a separate run for tests which check that certain passes are run for PGO.
- Add a check that the dwarf fission mode is split when generating a split dwarf file.
- Some of the avx-builtin tests emit extra bitcasts which seem to add unnecessary bitcasts. Logically, the behavior is still the same with these bitcasts, but we just check for them if running with the new PM. I couldn’t come up with a better way to ignore/remove them.
- Some of the stores and allocas in CodeGen/avx512-reduceMinMaxIntrin.c were out of order under new PM, but the behavior of the function is still the same. For this, we just ignore pointers that are meant to be loaded/stored in specific lines. I'm not sure if this is the best solution for this tho.
Fixes in this patch:
- CodeGen/flatten.c will fail under new PM becausec the new PM AlwaysInliner seems to intentionally inline functions but not call sites marked with alwaysinline (D23299)
- Tests that check remarks happen to check them for the inliner which is not turned on at O0. These tests just check that remarks work, but we can make separate tests for the new PM with -O1 so we can turn on the inliner and check the remarks with minimal changes.