Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MC][AMDGPU] Consume EndOfStatement in asm parser
Avoids spurious newlines showing up in the output when emitting assembly via MC. Reviewed By: MaskRay, arsenm Differential Revision: https://reviews.llvm.org/D92690
- Loading branch information
Showing
2 changed files
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# RUN: llvm-mc -preserve-comments -triple amdgcn-amd-amdhsa %s >%t-1.s | ||
# RUN: llvm-mc -preserve-comments -triple amdgcn-amd-amdhsa %t-1.s >%t-2.s | ||
# RUN: diff %t-1.s %t-2.s | ||
|
||
# Test that AMDGPU assembly round-trips when run through MC; the first | ||
# transition from hand-written to "canonical" output may introduce some small | ||
# differences, so we don't include the initial input in the comparison. | ||
|
||
.text | ||
|
||
# The AMDGPU asm parser didn't consume the end of statement | ||
# consistently, which led to extra empty lines in the output. | ||
s_nop 0 |