The script allows the auto-generation of checks for cost model tests to speed up their creation and help improve coverage, which will help a lot with PR36550.
I've branched this from update_test_checks.py - as can be seen, the diff is quite small but I wasn't sure if we wanted to have a script that tried to handle both analysis and ir in the same test files or not?
If the need arises we can add support for other analyze passes as well, but the cost models was the one I needed to get done - at the moment it just warns that its unsupported.
I've regenerated a couple of x86 test files to show the effect.