summaryrefslogtreecommitdiff
path: root/utils/update_llc_test_checks.py
diff options
context:
space:
mode:
authorNikolai Bozhenov <nikolai.bozhenov@intel.com>2017-01-14 09:39:35 +0000
committerNikolai Bozhenov <nikolai.bozhenov@intel.com>2017-01-14 09:39:35 +0000
commitd4a4367ac01ada009564f9c208390f09ebfc3f63 (patch)
treedadc0c7fae99851cbf17ad598148e6130cb690ff /utils/update_llc_test_checks.py
parent7b47370e8e993342c5b91139d7679b59c989132e (diff)
[utils] Improve extraction of check prefixes from RUN lines
Correct handling of the following FileCheck options is implemented in update_llc_test_checks.py and update_test_checks.py scripts: 1) -check-prefix (with a single dash) 2) -check-prefixes (with multiple prefixes) Differential Revision: https://reviews.llvm.org/D28572 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292008 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/update_llc_test_checks.py')
-rwxr-xr-xutils/update_llc_test_checks.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/update_llc_test_checks.py b/utils/update_llc_test_checks.py
index d077c8a8eb2..6d489a4f3b3 100755
--- a/utils/update_llc_test_checks.py
+++ b/utils/update_llc_test_checks.py
@@ -54,7 +54,7 @@ RUN_LINE_RE = re.compile('^\s*;\s*RUN:\s*(.*)$')
TRIPLE_ARG_RE = re.compile(r'-mtriple=([^ ]+)')
TRIPLE_IR_RE = re.compile(r'^target\s+triple\s*=\s*"([^"]+)"$')
IR_FUNCTION_RE = re.compile('^\s*define\s+(?:internal\s+)?[^@]*@(\w+)\s*\(')
-CHECK_PREFIX_RE = re.compile('--check-prefix=(\S+)')
+CHECK_PREFIX_RE = re.compile('--?check-prefix(?:es)?=(\S+)')
CHECK_RE = re.compile(r'^\s*;\s*([^:]+?)(?:-NEXT|-NOT|-DAG|-LABEL)?:')
ASM_FUNCTION_PPC_RE = re.compile(
@@ -260,8 +260,8 @@ def main():
llc_cmd_args = llc_cmd[len('llc'):].strip()
llc_cmd_args = llc_cmd_args.replace('< %s', '').replace('%s', '').strip()
- check_prefixes = [m.group(1)
- for m in CHECK_PREFIX_RE.finditer(filecheck_cmd)]
+ check_prefixes = [item for m in CHECK_PREFIX_RE.finditer(filecheck_cmd)
+ for item in m.group(1).split(',')]
if not check_prefixes:
check_prefixes = ['CHECK']