[UpdateTestChecks] Don't skip first line with --filter

body_start was never used, resulting in the first filtered line to be
skipped.
Fixes the --filter option introduced in D117694.

Differential Revision: https://reviews.llvm.org/D119704
This commit is contained in:
Sebastian Neubauer 2022-02-14 12:07:34 +01:00
parent 41a62cc0b4
commit 473efae3a1
4 changed files with 4 additions and 1 deletions

View File

@ -3,6 +3,7 @@
define i32 @f(<8 x float> %A, i8* %B, <4 x double> %C, <4 x i64> %E, <8 x i32> %F, <16 x i16> %G, <32 x i8> %H, i32* %loadptr) nounwind {
; CHECK-LABEL: f:
; CHECK: # %bb.0:
; CHECK: movl (%rsi), %eax
; CHECK: vaddps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
; CHECK: vpaddq {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm2, %ymm0

View File

@ -3,6 +3,7 @@
define i32 @f(<8 x float> %A, i8* %B, <4 x double> %C, <4 x i64> %E, <8 x i32> %F, <16 x i16> %G, <32 x i8> %H, i32* %loadptr) nounwind {
; CHECK-LABEL: f:
; CHECK: vmovntps %ymm0, (%rdi)
; CHECK: vmovntdq %ymm0, (%rdi)
; CHECK: vmovntpd %ymm0, (%rdi)
; CHECK: vmovntdq %ymm0, (%rdi)

View File

@ -3,6 +3,7 @@
define i32 @f(<8 x float> %A, i8* %B, <4 x double> %C, <4 x i64> %E, <8 x i32> %F, <16 x i16> %G, <32 x i8> %H, i32* %loadptr) nounwind {
; CHECK-LABEL: f:
; CHECK: movl (%rsi), %eax
; CHECK: vaddps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
; CHECK: vmovntps %ymm0, (%rdi)
; CHECK: vpaddq {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm2, %ymm0

View File

@ -853,7 +853,7 @@ def add_checks(output_lines, comment_marker, prefix_list, func_dict, func_name,
body_start = 0
else:
output_lines.append('%s %s: %s' % (comment_marker, checkprefix, func_body[0]))
for func_line in func_body[1:]:
for func_line in func_body[body_start:]:
if func_line.strip() == '':
output_lines.append('%s %s-EMPTY:' % (comment_marker, checkprefix))
else: