Skip to content

Commit 7786266

Browse files
authored
AMDGPU: Expand shuffle testing with generated tests (#123574)
Add some generated tests with every shuffle permutation for relevant vector element types and sizes. Not sure if this is going overboard with the number of tests. I pruned out the largest cases (16 and 32-bit cases are impractically large), and there's redundancy when testing the pointer cases (at least for SelectionDAG). This uses inline assembly to produce sample values because of how the ABI is lowered when using a function argument. Since we break all arguments into 32-bit pieces, a shuffle never ends up forming. We need separate handling to reconstruct shuffles in contexts involving physical registers in ABI contexts. I wrote a small tool to generate these, so I can easily change the exact test body. Not sure if it's worth posting anywhere. This is in preparation for making better use of v_pk_mov_b32, v_mov_b64 and s_mov_b64 in shuffles.
1 parent e87b843 commit 7786266

File tree

79 files changed

+900397
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+900397
-0
lines changed

llvm/test/CodeGen/AMDGPU/shufflevector.v2bf16.v2bf16.ll

Lines changed: 2042 additions & 0 deletions
Large diffs are not rendered by default.

llvm/test/CodeGen/AMDGPU/shufflevector.v2bf16.v3bf16.ll

Lines changed: 4437 additions & 0 deletions
Large diffs are not rendered by default.

llvm/test/CodeGen/AMDGPU/shufflevector.v2bf16.v4bf16.ll

Lines changed: 7377 additions & 0 deletions
Large diffs are not rendered by default.

llvm/test/CodeGen/AMDGPU/shufflevector.v2bf16.v8bf16.ll

Lines changed: 27671 additions & 0 deletions
Large diffs are not rendered by default.

llvm/test/CodeGen/AMDGPU/shufflevector.v2f16.v2f16.ll

Lines changed: 2042 additions & 0 deletions
Large diffs are not rendered by default.

llvm/test/CodeGen/AMDGPU/shufflevector.v2f16.v3f16.ll

Lines changed: 4437 additions & 0 deletions
Large diffs are not rendered by default.

llvm/test/CodeGen/AMDGPU/shufflevector.v2f16.v4f16.ll

Lines changed: 7377 additions & 0 deletions
Large diffs are not rendered by default.

llvm/test/CodeGen/AMDGPU/shufflevector.v2f16.v8f16.ll

Lines changed: 27671 additions & 0 deletions
Large diffs are not rendered by default.

llvm/test/CodeGen/AMDGPU/shufflevector.v2f32.v2f32.ll

Lines changed: 1875 additions & 0 deletions
Large diffs are not rendered by default.

llvm/test/CodeGen/AMDGPU/shufflevector.v2f32.v3f32.ll

Lines changed: 4236 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)