diff options
author | Fangrui Song <i@maskray.me> | 2021-05-21 19:26:15 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2021-05-21 19:26:15 -0700 |
commit | 5d9ea36baffe682649923d29161cc58ca3d1a243 (patch) | |
tree | e9a61d7a1671fe9c25bdbe0a70efd362b33550a7 /llvm/utils/UpdateTestChecks/asm.py | |
parent | e162dc6f281e817e6dd000be71bfaf6bad358d79 (diff) | |
download | llvm-5d9ea36baffe682649923d29161cc58ca3d1a243.zip llvm-5d9ea36baffe682649923d29161cc58ca3d1a243.tar.gz llvm-5d9ea36baffe682649923d29161cc58ca3d1a243.tar.bz2 |
[UpdateTestChecks] Default --x86_scrub_rip to False
True is a bad default: the useful symbol names and `@GOTPCREL` are scrubbed.
Change the default and add global variable tests to x86-basic.ll
(renamed from x86_function_name.ll since we now also test variables).
I updated some tests to show the differences.
Updated LCPI regex to include Darwin style `LCPI_[0-9]+_[0-9]+` (no
leading dot).
Reviewed By: pengfei
Differential Revision: https://reviews.llvm.org/D102588
Diffstat (limited to 'llvm/utils/UpdateTestChecks/asm.py')
-rw-r--r-- | llvm/utils/UpdateTestChecks/asm.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/utils/UpdateTestChecks/asm.py b/llvm/utils/UpdateTestChecks/asm.py index b5546e7..c29d3ac 100644 --- a/llvm/utils/UpdateTestChecks/asm.py +++ b/llvm/utils/UpdateTestChecks/asm.py @@ -171,7 +171,7 @@ SCRUB_X86_SPILL_RELOAD_RE = ( flags=re.M)) SCRUB_X86_SP_RE = re.compile(r'\d+\(%(esp|rsp)\)') SCRUB_X86_RIP_RE = re.compile(r'[.\w]+\(%rip\)') -SCRUB_X86_LCP_RE = re.compile(r'\.LCPI[0-9]+_[0-9]+') +SCRUB_X86_LCP_RE = re.compile(r'\.?LCPI[0-9]+_[0-9]+') SCRUB_X86_RET_RE = re.compile(r'ret[l|q]') def scrub_asm_x86(asm, args): @@ -197,7 +197,7 @@ def scrub_asm_x86(asm, args): # Generically match a RIP-relative memory operand. asm = SCRUB_X86_RIP_RE.sub(r'{{.*}}(%rip)', asm) # Generically match a LCP symbol. - asm = SCRUB_X86_LCP_RE.sub(r'{{\.LCPI[0-9]+_[0-9]+}}', asm) + asm = SCRUB_X86_LCP_RE.sub(r'{{\.?LCPI[0-9]+_[0-9]+}}', asm) if getattr(args, 'extra_scrub', False): # Avoid generating different checks for 32- and 64-bit because of 'retl' vs 'retq'. asm = SCRUB_X86_RET_RE.sub(r'ret{{[l|q]}}', asm) |