update_mir_test_checks: Better handling of common prefixes
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 24 May 2022 23:57:14 +0000 (01:57 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 1 Jun 2022 20:53:32 +0000 (15:53 -0500)
commitd53de9b7ac394963730ef34616d4104746eea0f0
tree1b42e817363b3b4f5e4851e42152087ae8cec32e
parentd9de52819dbd37aa8007efce69016175d849cdde
update_mir_test_checks: Better handling of common prefixes

Support the pattern where a test file uses multiple prefixes per run line:
one prefix that is unique to the run line, and additional prefixes that are
common with other run lines.

Decide on a per-function basis which prefix(es) to emit, based on which run
lines have the same output.

Move the renaming of vregs earlier, so that we can compare the output as it
would actually be printed in check lines.

Differential Revision: https://reviews.llvm.org/D126411
llvm/test/tools/UpdateTestChecks/update_mir_test_checks/Inputs/x86-multiple-prefixes.ll [new file with mode: 0644]
llvm/test/tools/UpdateTestChecks/update_mir_test_checks/Inputs/x86-multiple-prefixes.ll.expected [new file with mode: 0644]
llvm/test/tools/UpdateTestChecks/update_mir_test_checks/x86-multiple-prefixes.test [new file with mode: 0644]
llvm/utils/update_mir_test_checks.py