aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/UpdateTestChecks/asm.py
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@sifive.com>2021-03-28 11:30:49 -0700
committerCraig Topper <craig.topper@sifive.com>2021-03-28 11:39:46 -0700
commit0248e24071666a348f10cf49496ef5fde4c986d2 (patch)
treef73477425c65ed799844d01cf30b24a7853514fe /llvm/utils/UpdateTestChecks/asm.py
parent1e9746d2291f3287fd47e8135a9e7d735d2d45db (diff)
downloadllvm-0248e24071666a348f10cf49496ef5fde4c986d2.zip
llvm-0248e24071666a348f10cf49496ef5fde4c986d2.tar.gz
llvm-0248e24071666a348f10cf49496ef5fde4c986d2.tar.bz2
[X86][update_llc_test_checks] Use a less greedy regular expression for replacing constant pool labels in tests.
While working on D97208 I noticed that these greedy regular expressions prevent tests from failing when (%rip) appears after a constant pool label when it didn't before. Reviewed By: RKSimon, pengfei Differential Revision: https://reviews.llvm.org/D99460
Diffstat (limited to 'llvm/utils/UpdateTestChecks/asm.py')
-rw-r--r--llvm/utils/UpdateTestChecks/asm.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/utils/UpdateTestChecks/asm.py b/llvm/utils/UpdateTestChecks/asm.py
index 3cbedfe..b5546e7 100644
--- a/llvm/utils/UpdateTestChecks/asm.py
+++ b/llvm/utils/UpdateTestChecks/asm.py
@@ -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.*}}', 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)