Index: llvm/trunk/utils/update_llc_test_checks.py =================================================================== --- llvm/trunk/utils/update_llc_test_checks.py +++ llvm/trunk/utils/update_llc_test_checks.py @@ -54,7 +54,7 @@ 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 @@ 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'] Index: llvm/trunk/utils/update_test_checks.py =================================================================== --- llvm/trunk/utils/update_test_checks.py +++ llvm/trunk/utils/update_test_checks.py @@ -66,7 +66,7 @@ r'^\s*define\s+(?:internal\s+)?[^@]*@(?P[\w-]+?)\s*\(' r'(\s+)?[^)]*[^{]*\{\n(?P.*?)^\}$', flags=(re.M | re.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)?:') # Match things that look at identifiers, but only if they are followed by # spaces, commas, paren, or end of the string @@ -324,8 +324,8 @@ tool_cmd_args = tool_cmd[len(tool_basename):].strip() tool_cmd_args = tool_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']