[llvm] 473efae - [UpdateTestChecks] Don't skip first line with --filter
Sebastian Neubauer via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 3 08:27:30 PST 2022
Author: Sebastian Neubauer
Date: 2022-03-03T17:27:14+01:00
New Revision: 473efae3a18fd6dcbf00d95de3fa22a7294f31c0
URL: https://github.com/llvm/llvm-project/commit/473efae3a18fd6dcbf00d95de3fa22a7294f31c0
DIFF: https://github.com/llvm/llvm-project/commit/473efae3a18fd6dcbf00d95de3fa22a7294f31c0.diff
LOG: [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
Added:
Modified:
llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll.filter-out.expected
llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll.filter.expected
llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll.multifilter.expected
llvm/utils/UpdateTestChecks/common.py
Removed:
################################################################################
diff --git a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll.filter-out.expected b/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll.filter-out.expected
index 49577b7ba8bea..369473213ac29 100644
--- a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll.filter-out.expected
+++ b/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll.filter-out.expected
@@ -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
diff --git a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll.filter.expected b/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll.filter.expected
index 3ab1ea0231b00..33748cb139847 100644
--- a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll.filter.expected
+++ b/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll.filter.expected
@@ -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)
diff --git a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll.multifilter.expected b/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll.multifilter.expected
index 46a9b5459321b..74474141e60f9 100644
--- a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll.multifilter.expected
+++ b/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll.multifilter.expected
@@ -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
diff --git a/llvm/utils/UpdateTestChecks/common.py b/llvm/utils/UpdateTestChecks/common.py
index 3361f686187ef..c073f25d384be 100644
--- a/llvm/utils/UpdateTestChecks/common.py
+++ b/llvm/utils/UpdateTestChecks/common.py
@@ -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:
More information about the llvm-commits
mailing list