summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xllvm/utils/update_llc_test_checks.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/llvm/utils/update_llc_test_checks.py b/llvm/utils/update_llc_test_checks.py
index 2b43157f222..6fbab0b6a89 100755
--- a/llvm/utils/update_llc_test_checks.py
+++ b/llvm/utils/update_llc_test_checks.py
@@ -19,7 +19,7 @@ import re
from UpdateTestChecks import asm, common
-ADVERT = '; NOTE: Assertions have been autogenerated by '
+ADVERT = ' NOTE: Assertions have been autogenerated by '
def main():
@@ -44,7 +44,6 @@ def main():
args = parser.parse_args()
script_name = os.path.basename(__file__)
- autogenerated_note = (ADVERT + 'utils/' + script_name)
test_paths = [test for pattern in args.tests for test in glob.glob(pattern)]
for test in test_paths:
@@ -118,6 +117,13 @@ def main():
llc_cmd_args = llc_cmd[len(llc_tool):].strip()
llc_cmd_args = llc_cmd_args.replace('< %s', '').replace('%s', '').strip()
+ if test.endswith('.mir'):
+ llc_cmd_args += ' -x mir'
+ comment_sym = '#'
+ check_indent = ' '
+ else:
+ comment_sym = ';'
+ check_indent = ''
check_prefixes = [item for m in common.CHECK_PREFIX_RE.finditer(filecheck_cmd)
for item in m.group(1).split(',')]
@@ -128,6 +134,8 @@ def main():
# now, we just ignore all but the last.
run_list.append((check_prefixes, llc_cmd_args, triple_in_cmd, march_in_cmd))
+ autogenerated_note = (comment_sym + ADVERT + 'utils/' + script_name)
+
func_dict = {}
for p in run_list:
prefixes = p[0]
@@ -166,7 +174,7 @@ def main():
continue
# Print out the various check lines here.
- asm.add_asm_checks(output_lines, ';', run_list, func_dict, func_name)
+ asm.add_asm_checks(output_lines, check_indent + ';', run_list, func_dict, func_name)
is_in_function_start = False
if is_in_function:
@@ -180,7 +188,7 @@ def main():
continue
# Discard any previous script advertising.
- if input_line.startswith(ADVERT):
+ if input_line.startswith(comment_sym + ADVERT):
continue
# If it's outside a function, it just gets copied to the output.
OpenPOWER on IntegriCloud