[Mlir-commits] [mlir] [mlir][generate-test-checks] Do not emit the autogenerated note if it exists (PR #143750)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Jun 11 10:10:09 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: Michael Maitland (michaelmaitland)
<details>
<summary>Changes</summary>
Prior to this PR, the script removed the already existing autogenerated note if we came across a line that was equal to the note. But the default note is multiple lines, so there would never be a match. Instead, check to see if the current line is a substring of the autogenerated note.
---
Full diff: https://github.com/llvm/llvm-project/pull/143750.diff
1 Files Affected:
- (modified) mlir/utils/generate-test-checks.py (+1-1)
``````````diff
diff --git a/mlir/utils/generate-test-checks.py b/mlir/utils/generate-test-checks.py
index 11fb4e40072e7..f77c9688d9318 100755
--- a/mlir/utils/generate-test-checks.py
+++ b/mlir/utils/generate-test-checks.py
@@ -208,7 +208,7 @@ def process_source_lines(source_lines, note, args):
source_segments = [[]]
for line in source_lines:
# Remove previous note.
- if line == note:
+ if line in note:
continue
# Remove previous CHECK lines.
if line.find(args.check_prefix) != -1:
``````````
</details>
https://github.com/llvm/llvm-project/pull/143750
More information about the Mlir-commits
mailing list