Skip to content

[mlir][utils] Update generate-test-checks.py #136757

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions mlir/utils/generate-test-checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,12 @@ def main():
for argument in ssa_split[1:]:
output_line += "// " + args.check_prefix + "-SAME: "

# Pad to align with the original position in the line.
output_line += " " * len(ssa_split[0])
# Pad to align with the original position in the line (i.e. where the label ends),
# unless the label is more than 20 chars long, in which case pad with 4 spaces
# (this is to avoid deep indentation).
label_length = len(ssa_split[0])
pad_depth = label_length if label_length < 21 else 4
output_line += " " * pad_depth

# Process the rest of the line.
output_line += process_line(
Expand Down
Loading