Skip to content

Commit 3729d15

Browse files
committed
[GCN] Remove trailing spaces after instruction mnemonics
1 parent 72f1516 commit 3729d15

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/cleanup/gcn.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ function align_instruction_operand(column)
7070
mnemonic_end = m.offsets[1]
7171
old_operands_pos = m.offsets[2]
7272

73+
if all(isspace, m[2])
74+
# In case the operands are just trailing spaces, return only the mnemonic
75+
return m.match[1:mnemonic_end-1]
76+
end
77+
7378
# Set a minimum of spaces between the mnemonic and the operands
7479
old_spaces_count = old_operands_pos - mnemonic_end
7580
if old_spaces_count < min_spaces

0 commit comments

Comments
 (0)