diff options
author | Roman Lebedev <lebedev.ri@gmail.com> | 2019-05-18 13:00:03 +0000 |
---|---|---|
committer | Roman Lebedev <lebedev.ri@gmail.com> | 2019-05-18 13:00:03 +0000 |
commit | 98092f37d0dd5df663ce718b397678db3f3d8c13 (patch) | |
tree | 01285429f4d1abab3e5cd4feada11390e9bff757 /llvm/utils/UpdateTestChecks | |
parent | 822b9c971be6784fe3dc04f4a7926834c1c818d3 (diff) | |
download | bcm5719-llvm-98092f37d0dd5df663ce718b397678db3f3d8c13.tar.gz bcm5719-llvm-98092f37d0dd5df663ce718b397678db3f3d8c13.zip |
UpdateTestChecks: fix AMDGPU handling
Summary:
Was looking into supporting `(srl (shl x, c1), c2)` with c1 != c2 in dagcombiner,
this test changes, but makes `update_llc_test_checks.py` unhappy.
**Many** AMDGPU tests specify `-march`, not `-mtriple`, which results in `update_llc_test_checks.py`
defaulting to x86 asm function detection heuristics, which don't work here.
I propose to fix this by adding an infrastructure to map from `-march` to `-mtriple`,
in the UpdateTestChecks tooling.
Reviewers: RKSimon, MaskRay, arsenm
Reviewed By: arsenm
Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62099
llvm-svn: 361101
Diffstat (limited to 'llvm/utils/UpdateTestChecks')
-rw-r--r-- | llvm/utils/UpdateTestChecks/asm.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/utils/UpdateTestChecks/asm.py b/llvm/utils/UpdateTestChecks/asm.py index 1e9f7979c24..1d7a02b095a 100644 --- a/llvm/utils/UpdateTestChecks/asm.py +++ b/llvm/utils/UpdateTestChecks/asm.py @@ -1,3 +1,4 @@ +from __future__ import print_function import re import sys @@ -199,6 +200,15 @@ def scrub_asm_systemz(asm, args): asm = common.SCRUB_TRAILING_WHITESPACE_RE.sub(r'', asm) return asm +def get_triple_from_march(march): + triples = { + 'amdgcn': 'amdgcn', + } + for prefix, triple in triples.items(): + if march.startswith(prefix): + return triple + print("Cannot find a triple. Assume 'x86'", file=sys.stderr) + return 'x86' def build_function_body_dictionary_for_triple(args, raw_tool_output, triple, prefixes, func_dict): target_handlers = { |