diff options
author | Sanjay Patel <spatel@rotateright.com> | 2017-10-20 21:55:23 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2017-10-20 21:55:23 +0000 |
commit | 84aa0af49572e6c25a8f5c3f358e3b3fd8276d00 (patch) | |
tree | d1c19b07fc23fa1df38a58610be00faee9263950 /utils/update_llc_test_checks.py | |
parent | 8b6784b39c7f1f2d65179691cca4ee4a26e88741 (diff) |
[utils, x86] add regex for retl/retq to reduce duplicated FileChecking (PR35003)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316242 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/update_llc_test_checks.py')
-rwxr-xr-x | utils/update_llc_test_checks.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/utils/update_llc_test_checks.py b/utils/update_llc_test_checks.py index 02bcc2df5d7..73d9a6f963b 100755 --- a/utils/update_llc_test_checks.py +++ b/utils/update_llc_test_checks.py @@ -79,6 +79,7 @@ SCRUB_X86_SHUFFLES_RE = ( 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_RET_RE = re.compile(r'ret[l|q]') RUN_LINE_RE = re.compile('^\s*;\s*RUN:\s*(.*)$') TRIPLE_ARG_RE = re.compile(r'-mtriple=([^ ]+)') @@ -101,6 +102,8 @@ def scrub_asm_x86(asm): asm = SCRUB_X86_RIP_RE.sub(r'{{.*}}(%rip)', asm) # Generically match a LCP symbol. asm = SCRUB_X86_LCP_RE.sub(r'{{\.LCPI.*}}', asm) + # 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) # Strip kill operands inserted into the asm. asm = SCRUB_KILL_COMMENT_RE.sub('', asm) # Strip trailing whitespace. |