[PATCH] D116832: [UpdateLLCTestChecks] Allow replacing register names with variables

David Greene via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 7 11:05:11 PST 2022


greened created this revision.
greened added reviewers: jdoerfert, timsmith78, cameron.mcinally, Flakebi, lebedev.ri, MaskRay, arichardson, hvdijk.
greened added a project: LLVM.
Herald added a subscriber: pengfei.
greened requested review of this revision.

Add a --scrub-reg-names to convert target-specific register names to FileCheck
variables.  This patch only implements the regular expression for X86.  Other
targets will not query the option, though adding support for it is simply a
matter of checking the option and passing a regular expression that matches
register names on the target.

The x86 regular expression intentionally does not substitute for [re]?sp and
[re]?ip because it's likely that tests will want to match based on addressing
mode.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D116832

Files:
  llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-reg-names.ll
  llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-reg-names.ll.noscrub.expected
  llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-reg-names.ll.scrub.expected
  llvm/test/tools/UpdateTestChecks/update_llc_test_checks/x86-reg-names.test
  llvm/utils/UpdateTestChecks/asm.py
  llvm/utils/update_llc_test_checks.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116832.398196.patch
Type: text/x-patch
Size: 15388 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220107/9f8d2db9/attachment-0001.bin>


More information about the llvm-commits mailing list