diff --git a/llvm/utils/UpdateTestChecks/common.py b/llvm/utils/UpdateTestChecks/common.py --- a/llvm/utils/UpdateTestChecks/common.py +++ b/llvm/utils/UpdateTestChecks/common.py @@ -273,7 +273,8 @@ def add_ir_checks(output_lines, comment_marker, prefix_list, func_dict, func_name, preserve_names): # Label format is based on IR string. - check_label_format = '{} %s-LABEL: @%s('.format(comment_marker) + function_def_regex = 'define {{[^@]+}}' + check_label_format = '{} %s-LABEL: {}@%s('.format(comment_marker, function_def_regex) add_checks(output_lines, comment_marker, prefix_list, func_dict, func_name, check_label_format, False, preserve_names)