[update_(llc_)test_checks.py] Support pre-processing commands
authorAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Wed, 21 Apr 2021 11:19:08 +0000 (12:19 +0100)
committerAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Wed, 28 Apr 2021 11:19:19 +0000 (12:19 +0100)
commit9692811b264600b7fcb52a1f4fcf938d198567cb
tree1a5d3bc3976d72c35e1a4e7b0bf7c5934788e3b1
parentd0c521da3f0cfd1bd01696773349f1b723d8b057
[update_(llc_)test_checks.py] Support pre-processing commands

This has been rather useful in our downstream CHERI target where we want
to run tests both with addrspace(0) and addrspace(200) pointers.
With this patch we can prefix the opt command with
`sed -e 's/addrspace(200)/addrspace(0)/g' -e 's/-A200-P200-G200//g'` to
test both cases using the same IR input.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D95137
llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/pre-process.ll [new file with mode: 0644]
llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/pre-process.ll.expected [new file with mode: 0644]
llvm/test/tools/UpdateTestChecks/update_llc_test_checks/pre-process.test [new file with mode: 0644]
llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/pre-process.ll [new file with mode: 0644]
llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/pre-process.ll.expected [new file with mode: 0644]
llvm/test/tools/UpdateTestChecks/update_test_checks/pre-process.test [new file with mode: 0644]
llvm/utils/UpdateTestChecks/common.py
llvm/utils/update_llc_test_checks.py
llvm/utils/update_test_checks.py