[MLIR] Remove generated spaces at eof for generate-test-checks.py.
diff --git a/mlir/utils/generate-test-checks.py b/mlir/utils/generate-test-checks.py
index e08f64e..4b590b2 100755
--- a/mlir/utils/generate-test-checks.py
+++ b/mlir/utils/generate-test-checks.py
@@ -90,7 +90,7 @@
     # Append the non named group.
     output_line += chunk[len(ssa_name):]
 
-  return output_line + '\n'
+  return output_line.rstrip() + '\n'
 
 
 def process_source_lines(source_lines, note, args):