llvm.org GIT mirror llvm / 82cd943
update_mir_test_checks: Be careful about replacing entire vregs Previously, this could end up replacing a vreg like %14 with [[VREG1]]4, where VREG1 was the match for %1. That's obviously not correct, though it hasn't actually come up in any tests I've converted so far. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317509 91177308-0d34-0410-b5e6-96231b3b80d8 Justin Bogner 1 year, 11 months ago
1 changed file(s) with 2 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
253253 func_line = func_line.replace(
254254 vreg.group(1), '[[{}:%[0-9]+]]'.format(name), 1)
255255 for number, name in vreg_map.items():
256 func_line = func_line.replace(number, '[[{}]]'.format(name))
256 func_line = re.sub(r'{}\b'.format(number), '[[{}]]'.format(name),
257 func_line)
257258 check_line = '{}: {}'.format(check, func_line[indent:]).rstrip()
258259 output_lines.append(check_line)
259260