Index: utils/UpdateTestChecks/common.py =================================================================== --- utils/UpdateTestChecks/common.py +++ utils/UpdateTestChecks/common.py @@ -190,16 +190,10 @@ output_lines.append(check_label_format % (checkprefix, func_name)) func_body = func_dict[checkprefix][func_name].splitlines() - # For ASM output, just emit the check lines. - if is_asm == True: - output_lines.append('%s %s: %s' % (comment_marker, checkprefix, func_body[0])) - for func_line in func_body[1:]: - output_lines.append('%s %s-NEXT: %s' % (comment_marker, checkprefix, func_line)) - break - # For IR output, change all defs to FileCheck variables, so we're immune # to variable naming fashions. - func_body = genericize_check_lines(func_body, is_analyze) + if is_asm == False: + func_body = genericize_check_lines(func_body, is_analyze) # This could be selectively enabled with an optional invocation argument. # Disabled for now: better to check everything. Be safe rather than sorry. @@ -212,14 +206,18 @@ # output_lines.append('%s %s: %s' % (comment_marker, checkprefix, func_body[0])) # is_blank_line = False - is_blank_line = False + # In the case of assembly there may be scrubbed lines between the label + # of a function and the start of the lines we're checking. + is_blank_line = is_asm for func_line in func_body: if func_line.strip() == '': is_blank_line = True continue - # Do not waste time checking IR comments. - func_line = SCRUB_IR_COMMENT_RE.sub(r'', func_line) + + if is_asm == False: + # Do not waste time checking IR comments. + func_line = SCRUB_IR_COMMENT_RE.sub(r'', func_line) # Skip blank lines instead of checking them. if is_blank_line == True: