diff options
Diffstat (limited to 'llvm/utils/update_llc_test_checks.py')
| -rwxr-xr-x | llvm/utils/update_llc_test_checks.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/llvm/utils/update_llc_test_checks.py b/llvm/utils/update_llc_test_checks.py index 9dd25d386b1..0936a449c24 100755 --- a/llvm/utils/update_llc_test_checks.py +++ b/llvm/utils/update_llc_test_checks.py @@ -81,6 +81,11 @@ def main(): if m: triple_in_cmd = m.groups()[0] + march_in_cmd = None + m = common.MARCH_ARG_RE.search(llc_cmd) + if m: + march_in_cmd = m.groups()[0] + filecheck_cmd = '' if len(commands) > 1: filecheck_cmd = commands[1] @@ -102,24 +107,25 @@ def main(): # FIXME: We should use multiple check prefixes to common check lines. For # now, we just ignore all but the last. - run_list.append((check_prefixes, llc_cmd_args, triple_in_cmd)) + run_list.append((check_prefixes, llc_cmd_args, triple_in_cmd, march_in_cmd)) func_dict = {} for p in run_list: prefixes = p[0] for prefix in prefixes: func_dict.update({prefix: dict()}) - for prefixes, llc_args, triple_in_cmd in run_list: + for prefixes, llc_args, triple_in_cmd, march_in_cmd in run_list: if args.verbose: print('Extracted LLC cmd: llc ' + llc_args, file=sys.stderr) print('Extracted FileCheck prefixes: ' + str(prefixes), file=sys.stderr) raw_tool_output = common.invoke_tool(args.llc_binary, llc_args, test) - if not (triple_in_cmd or triple_in_ir): - print("Cannot find a triple. Assume 'x86'", file=sys.stderr) + triple = triple_in_cmd or triple_in_ir + if not triple: + triple = asm.get_triple_from_march(march_in_cmd) asm.build_function_body_dictionary_for_triple(args, raw_tool_output, - triple_in_cmd or triple_in_ir or 'x86', prefixes, func_dict) + triple, prefixes, func_dict) is_in_function = False is_in_function_start = False |

