forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AMDGPU][test]added unique and sort options for update_mc_test_check …
…script (llvm#111769) add a unique and a sort option to the update_mc_test_check script. These mc asm/dasm files are usually large in number of lines, and these lines are mostly similar to each other. These options can be useful when maintainer is merging or resolving conflicts by making the file identifical Also fixed a small issue in asm/dasm such that the auto generated header line is 1. asm using ";" instead of "//" as comment marker 2. dasm using ";" instead of "#" as comment marker
- Loading branch information
1 parent
449523f
commit 528e975
Showing
16 changed files
with
170 additions
and
13 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
llvm/test/tools/UpdateTestChecks/update_mc_test_checks/Inputs/amdgpu_asm.s.expected
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
2 changes: 1 addition & 1 deletion
2
llvm/test/tools/UpdateTestChecks/update_mc_test_checks/Inputs/amdgpu_asm_err.s.expected
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
5 changes: 5 additions & 0 deletions
5
llvm/test/tools/UpdateTestChecks/update_mc_test_checks/Inputs/amdgpu_asm_sort.s
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,5 @@ | ||
// RUN: llvm-mc -triple=amdgcn -show-encoding %s 2>&1 | FileCheck --check-prefixes=CHECK %s | ||
|
||
v_bfrev_b32 v5, v1 | ||
|
||
v_bfrev_b32 v1, v1 |
8 changes: 8 additions & 0 deletions
8
llvm/test/tools/UpdateTestChecks/update_mc_test_checks/Inputs/amdgpu_asm_sort.s.expected
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,8 @@ | ||
// NOTE: Assertions have been autogenerated by utils/update_mc_test_checks.py UTC_ARGS: --sort | ||
// RUN: llvm-mc -triple=amdgcn -show-encoding %s 2>&1 | FileCheck --check-prefixes=CHECK %s | ||
|
||
v_bfrev_b32 v1, v1 | ||
// CHECK: v_bfrev_b32_e32 v1, v1 ; encoding: [0x01,0x71,0x02,0x7e] | ||
|
||
v_bfrev_b32 v5, v1 | ||
// CHECK: v_bfrev_b32_e32 v5, v1 ; encoding: [0x01,0x71,0x0a,0x7e] |
9 changes: 9 additions & 0 deletions
9
llvm/test/tools/UpdateTestChecks/update_mc_test_checks/Inputs/amdgpu_asm_sort_with_comment.s
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,9 @@ | ||
// RUN: llvm-mc -triple=amdgcn -show-encoding %s 2>&1 | FileCheck --check-prefixes=CHECK %s | ||
|
||
v_bfrev_b32 v5, v1 //This is comment A | ||
|
||
v_bfrev_b32 v1, v1 | ||
// This is comment B | ||
|
||
// This is comment C | ||
v_bfrev_b32 v2, v1 |
13 changes: 13 additions & 0 deletions
13
...ols/UpdateTestChecks/update_mc_test_checks/Inputs/amdgpu_asm_sort_with_comment.s.expected
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 @@ | ||
// NOTE: Assertions have been autogenerated by utils/update_mc_test_checks.py UTC_ARGS: --sort | ||
// RUN: llvm-mc -triple=amdgcn -show-encoding %s 2>&1 | FileCheck --check-prefixes=CHECK %s | ||
|
||
v_bfrev_b32 v1, v1 | ||
// CHECK: v_bfrev_b32_e32 v1, v1 ; encoding: [0x01,0x71,0x02,0x7e] | ||
// This is comment B | ||
|
||
// This is comment C | ||
v_bfrev_b32 v2, v1 | ||
// CHECK: v_bfrev_b32_e32 v2, v1 ; encoding: [0x01,0x71,0x04,0x7e] | ||
|
||
v_bfrev_b32 v5, v1 //This is comment A | ||
// CHECK: v_bfrev_b32_e32 v5, v1 ; encoding: [0x01,0x71,0x0a,0x7e] |
10 changes: 10 additions & 0 deletions
10
llvm/test/tools/UpdateTestChecks/update_mc_test_checks/Inputs/amdgpu_asm_unique.s
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,10 @@ | ||
// RUN: llvm-mc -triple=amdgcn -show-encoding %s 2>&1 | FileCheck --check-prefixes=CHECK %s | ||
|
||
//this is commentA | ||
v_bfrev_b32 v5, v1 | ||
|
||
v_bfrev_b32 v5, v1 | ||
|
||
//this is commentB | ||
|
||
//this is commentB |
10 changes: 10 additions & 0 deletions
10
llvm/test/tools/UpdateTestChecks/update_mc_test_checks/Inputs/amdgpu_asm_unique.s.expected
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,10 @@ | ||
// NOTE: Assertions have been autogenerated by utils/update_mc_test_checks.py UTC_ARGS: --unique | ||
// RUN: llvm-mc -triple=amdgcn -show-encoding %s 2>&1 | FileCheck --check-prefixes=CHECK %s | ||
|
||
//this is commentA | ||
v_bfrev_b32 v5, v1 | ||
// CHECK: v_bfrev_b32_e32 v5, v1 ; encoding: [0x01,0x71,0x0a,0x7e] | ||
|
||
//this is commentB | ||
|
||
//this is commentB |
2 changes: 1 addition & 1 deletion
2
llvm/test/tools/UpdateTestChecks/update_mc_test_checks/Inputs/amdgpu_dasm.txt.expected
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
5 changes: 5 additions & 0 deletions
5
llvm/test/tools/UpdateTestChecks/update_mc_test_checks/Inputs/amdgpu_dasm_unique.txt
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,5 @@ | ||
# RUN: llvm-mc -triple=amdgcn -mcpu=gfx1100 -disassemble -show-encoding %s 2>&1 | FileCheck -check-prefixes=CHECK %s | ||
|
||
0x00,0x00,0x00,0x7e | ||
|
||
0x00,0x00,0x00,0x7e |
5 changes: 5 additions & 0 deletions
5
.../test/tools/UpdateTestChecks/update_mc_test_checks/Inputs/amdgpu_dasm_unique.txt.expected
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,5 @@ | ||
# NOTE: Assertions have been autogenerated by utils/update_mc_test_checks.py UTC_ARGS: --unique | ||
# RUN: llvm-mc -triple=amdgcn -mcpu=gfx1100 -disassemble -show-encoding %s 2>&1 | FileCheck -check-prefixes=CHECK %s | ||
|
||
0x00,0x00,0x00,0x7e | ||
# CHECK: v_nop ; encoding: [0x00,0x00,0x00,0x7e] |
2 changes: 1 addition & 1 deletion
2
...est/tools/UpdateTestChecks/update_mc_test_checks/Inputs/amdgpu_multirun_dasm.txt.expected
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
7 changes: 7 additions & 0 deletions
7
llvm/test/tools/UpdateTestChecks/update_mc_test_checks/amdgpu-sort.test
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,7 @@ | ||
# REQUIRES: amdgpu-registered-target | ||
## Check that sort is working | ||
|
||
# RUN: cp -f %S/Inputs/amdgpu_asm_sort.s %t.s && %update_mc_test_checks --sort %t.s | ||
# RUN: diff -u %S/Inputs/amdgpu_asm_sort.s.expected %t.s | ||
# RUN: cp -f %S/Inputs/amdgpu_asm_sort_with_comment.s %t.s && %update_mc_test_checks --sort %t.s | ||
# RUN: diff -u %S/Inputs/amdgpu_asm_sort_with_comment.s.expected %t.s |
7 changes: 7 additions & 0 deletions
7
llvm/test/tools/UpdateTestChecks/update_mc_test_checks/amdgpu-unique.test
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,7 @@ | ||
# REQUIRES: amdgpu-registered-target | ||
## Check that unique is working | ||
|
||
# RUN: cp -f %S/Inputs/amdgpu_asm_unique.s %t.s && %update_mc_test_checks --unique %t.s | ||
# RUN: diff -u %S/Inputs/amdgpu_asm_unique.s.expected %t.s | ||
# RUN: cp -f %S/Inputs/amdgpu_dasm_unique.txt %t.txt && %update_mc_test_checks --unique %t.txt | ||
# RUN: diff -u %S/Inputs/amdgpu_dasm_unique.txt.expected %t.txt |
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