|
1 | 1 | ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6 |
2 | | -; RUN: llc -global-isel=0 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1100 < %s | FileCheck -check-prefixes=GFX11 %s |
3 | | -; RUN: llc -global-isel=0 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1200 < %s | FileCheck -check-prefixes=GFX12 %s |
| 2 | +; RUN: llc -global-isel=0 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1100 < %s | FileCheck -check-prefixes=GFX11-W32 %s |
| 3 | +; RUN: llc -global-isel=0 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1200 < %s | FileCheck -check-prefixes=GFX12-W32 %s |
4 | 4 |
|
5 | | -; RUN: llc -global-isel=0 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1100 -mattr=+wavefrontsize64 < %s | FileCheck -check-prefixes=GFX11-64 %s |
6 | | -; RUN: llc -global-isel=0 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1200 -mattr=+wavefrontsize64 < %s | FileCheck -check-prefixes=GFX12-64 %s |
| 5 | +; RUN: llc -global-isel=0 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1100 -mattr=+wavefrontsize64 < %s | FileCheck -check-prefixes=GFX11-W64 %s |
| 6 | +; RUN: llc -global-isel=0 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1200 -mattr=+wavefrontsize64 < %s | FileCheck -check-prefixes=GFX12-W64 %s |
7 | 7 |
|
8 | 8 | declare float @llvm.amdgcn.subgroup.shuffle.float(float, i32) |
9 | 9 |
|
10 | 10 | define float @test_subgroup_shuffle_scalar(float %val, i32 %idx) { |
11 | | -; GFX11-LABEL: test_subgroup_shuffle_scalar: |
12 | | -; GFX11: ; %bb.0: ; %entry |
13 | | -; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
14 | | -; GFX11-NEXT: v_lshlrev_b32_e32 v1, 2, v1 |
15 | | -; GFX11-NEXT: ds_bpermute_b32 v0, v1, v0 |
16 | | -; GFX11-NEXT: s_waitcnt lgkmcnt(0) |
17 | | -; GFX11-NEXT: s_setpc_b64 s[30:31] |
| 11 | +; GFX11-W32-LABEL: test_subgroup_shuffle_scalar: |
| 12 | +; GFX11-W32: ; %bb.0: ; %entry |
| 13 | +; GFX11-W32-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 14 | +; GFX11-W32-NEXT: v_lshlrev_b32_e32 v1, 2, v1 |
| 15 | +; GFX11-W32-NEXT: ds_bpermute_b32 v0, v1, v0 |
| 16 | +; GFX11-W32-NEXT: s_waitcnt lgkmcnt(0) |
| 17 | +; GFX11-W32-NEXT: s_setpc_b64 s[30:31] |
18 | 18 | ; |
19 | | -; GFX12-LABEL: test_subgroup_shuffle_scalar: |
20 | | -; GFX12: ; %bb.0: ; %entry |
21 | | -; GFX12-NEXT: s_wait_loadcnt_dscnt 0x0 |
22 | | -; GFX12-NEXT: s_wait_expcnt 0x0 |
23 | | -; GFX12-NEXT: s_wait_samplecnt 0x0 |
24 | | -; GFX12-NEXT: s_wait_bvhcnt 0x0 |
25 | | -; GFX12-NEXT: s_wait_kmcnt 0x0 |
26 | | -; GFX12-NEXT: v_lshlrev_b32_e32 v1, 2, v1 |
27 | | -; GFX12-NEXT: ds_bpermute_b32 v0, v1, v0 |
28 | | -; GFX12-NEXT: s_wait_dscnt 0x0 |
29 | | -; GFX12-NEXT: s_setpc_b64 s[30:31] |
| 19 | +; GFX12-W32-LABEL: test_subgroup_shuffle_scalar: |
| 20 | +; GFX12-W32: ; %bb.0: ; %entry |
| 21 | +; GFX12-W32-NEXT: s_wait_loadcnt_dscnt 0x0 |
| 22 | +; GFX12-W32-NEXT: s_wait_expcnt 0x0 |
| 23 | +; GFX12-W32-NEXT: s_wait_samplecnt 0x0 |
| 24 | +; GFX12-W32-NEXT: s_wait_bvhcnt 0x0 |
| 25 | +; GFX12-W32-NEXT: s_wait_kmcnt 0x0 |
| 26 | +; GFX12-W32-NEXT: v_lshlrev_b32_e32 v1, 2, v1 |
| 27 | +; GFX12-W32-NEXT: ds_bpermute_b32 v0, v1, v0 |
| 28 | +; GFX12-W32-NEXT: s_wait_dscnt 0x0 |
| 29 | +; GFX12-W32-NEXT: s_setpc_b64 s[30:31] |
30 | 30 | ; |
31 | | -; GFX11-64-LABEL: test_subgroup_shuffle_scalar: |
32 | | -; GFX11-64: ; %bb.0: ; %entry |
33 | | -; GFX11-64-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
34 | | -; GFX11-64-NEXT: s_xor_saveexec_b64 s[0:1], -1 |
35 | | -; GFX11-64-NEXT: scratch_store_b32 off, v2, s32 ; 4-byte Folded Spill |
36 | | -; GFX11-64-NEXT: s_mov_b64 exec, s[0:1] |
37 | | -; GFX11-64-NEXT: v_lshlrev_b32_e32 v3, 2, v1 |
38 | | -; GFX11-64-NEXT: ; kill: def $vgpr0 killed $vgpr0 killed $exec |
39 | | -; GFX11-64-NEXT: ; kill: def $vgpr3 killed $vgpr3 killed $exec |
40 | | -; GFX11-64-NEXT: s_or_saveexec_b64 s[0:1], -1 |
41 | | -; GFX11-64-NEXT: v_permlane64_b32 v2, v0 |
42 | | -; GFX11-64-NEXT: ds_bpermute_b32 v2, v3, v2 |
43 | | -; GFX11-64-NEXT: s_mov_b64 exec, s[0:1] |
44 | | -; GFX11-64-NEXT: v_mbcnt_lo_u32_b32 v4, -1, 0 |
45 | | -; GFX11-64-NEXT: ds_bpermute_b32 v0, v3, v0 |
46 | | -; GFX11-64-NEXT: v_mbcnt_hi_u32_b32 v3, -1, v4 |
47 | | -; GFX11-64-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_2) |
48 | | -; GFX11-64-NEXT: v_xor_b32_e32 v1, v3, v1 |
49 | | -; GFX11-64-NEXT: s_waitcnt lgkmcnt(1) |
50 | | -; GFX11-64-NEXT: v_mov_b32_e32 v3, v2 |
51 | | -; GFX11-64-NEXT: v_and_b32_e32 v1, 32, v1 |
52 | | -; GFX11-64-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_3) |
53 | | -; GFX11-64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v1 |
54 | | -; GFX11-64-NEXT: s_waitcnt lgkmcnt(0) |
55 | | -; GFX11-64-NEXT: v_cndmask_b32_e32 v0, v3, v0, vcc |
56 | | -; GFX11-64-NEXT: s_xor_saveexec_b64 s[0:1], -1 |
57 | | -; GFX11-64-NEXT: scratch_load_b32 v2, off, s32 ; 4-byte Folded Reload |
58 | | -; GFX11-64-NEXT: s_mov_b64 exec, s[0:1] |
59 | | -; GFX11-64-NEXT: s_waitcnt vmcnt(0) |
60 | | -; GFX11-64-NEXT: s_setpc_b64 s[30:31] |
| 31 | +; GFX11-W64-LABEL: test_subgroup_shuffle_scalar: |
| 32 | +; GFX11-W64: ; %bb.0: ; %entry |
| 33 | +; GFX11-W64-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) |
| 34 | +; GFX11-W64-NEXT: s_xor_saveexec_b64 s[0:1], -1 |
| 35 | +; GFX11-W64-NEXT: scratch_store_b32 off, v2, s32 ; 4-byte Folded Spill |
| 36 | +; GFX11-W64-NEXT: s_mov_b64 exec, s[0:1] |
| 37 | +; GFX11-W64-NEXT: v_lshlrev_b32_e32 v3, 2, v1 |
| 38 | +; GFX11-W64-NEXT: ; kill: def $vgpr0 killed $vgpr0 killed $exec |
| 39 | +; GFX11-W64-NEXT: ; kill: def $vgpr3 killed $vgpr3 killed $exec |
| 40 | +; GFX11-W64-NEXT: s_or_saveexec_b64 s[0:1], -1 |
| 41 | +; GFX11-W64-NEXT: v_permlane64_b32 v2, v0 |
| 42 | +; GFX11-W64-NEXT: ds_bpermute_b32 v2, v3, v2 |
| 43 | +; GFX11-W64-NEXT: s_mov_b64 exec, s[0:1] |
| 44 | +; GFX11-W64-NEXT: v_mbcnt_lo_u32_b32 v4, -1, 0 |
| 45 | +; GFX11-W64-NEXT: ds_bpermute_b32 v0, v3, v0 |
| 46 | +; GFX11-W64-NEXT: v_mbcnt_hi_u32_b32 v3, -1, v4 |
| 47 | +; GFX11-W64-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_2) |
| 48 | +; GFX11-W64-NEXT: v_xor_b32_e32 v1, v3, v1 |
| 49 | +; GFX11-W64-NEXT: s_waitcnt lgkmcnt(1) |
| 50 | +; GFX11-W64-NEXT: v_mov_b32_e32 v3, v2 |
| 51 | +; GFX11-W64-NEXT: v_and_b32_e32 v1, 32, v1 |
| 52 | +; GFX11-W64-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_3) |
| 53 | +; GFX11-W64-NEXT: v_cmp_eq_u32_e32 vcc, 0, v1 |
| 54 | +; GFX11-W64-NEXT: s_waitcnt lgkmcnt(0) |
| 55 | +; GFX11-W64-NEXT: v_cndmask_b32_e32 v0, v3, v0, vcc |
| 56 | +; GFX11-W64-NEXT: s_xor_saveexec_b64 s[0:1], -1 |
| 57 | +; GFX11-W64-NEXT: scratch_load_b32 v2, off, s32 ; 4-byte Folded Reload |
| 58 | +; GFX11-W64-NEXT: s_mov_b64 exec, s[0:1] |
| 59 | +; GFX11-W64-NEXT: s_waitcnt vmcnt(0) |
| 60 | +; GFX11-W64-NEXT: s_setpc_b64 s[30:31] |
61 | 61 | ; |
62 | | -; GFX12-64-LABEL: test_subgroup_shuffle_scalar: |
63 | | -; GFX12-64: ; %bb.0: ; %entry |
64 | | -; GFX12-64-NEXT: s_wait_loadcnt_dscnt 0x0 |
65 | | -; GFX12-64-NEXT: s_wait_expcnt 0x0 |
66 | | -; GFX12-64-NEXT: s_wait_samplecnt 0x0 |
67 | | -; GFX12-64-NEXT: s_wait_bvhcnt 0x0 |
68 | | -; GFX12-64-NEXT: s_wait_kmcnt 0x0 |
69 | | -; GFX12-64-NEXT: v_lshlrev_b32_e32 v1, 2, v1 |
70 | | -; GFX12-64-NEXT: ds_bpermute_b32 v0, v1, v0 |
71 | | -; GFX12-64-NEXT: s_wait_dscnt 0x0 |
72 | | -; GFX12-64-NEXT: s_setpc_b64 s[30:31] |
| 62 | +; GFX12-W64-LABEL: test_subgroup_shuffle_scalar: |
| 63 | +; GFX12-W64: ; %bb.0: ; %entry |
| 64 | +; GFX12-W64-NEXT: s_wait_loadcnt_dscnt 0x0 |
| 65 | +; GFX12-W64-NEXT: s_wait_expcnt 0x0 |
| 66 | +; GFX12-W64-NEXT: s_wait_samplecnt 0x0 |
| 67 | +; GFX12-W64-NEXT: s_wait_bvhcnt 0x0 |
| 68 | +; GFX12-W64-NEXT: s_wait_kmcnt 0x0 |
| 69 | +; GFX12-W64-NEXT: v_lshlrev_b32_e32 v1, 2, v1 |
| 70 | +; GFX12-W64-NEXT: ds_bpermute_b32 v0, v1, v0 |
| 71 | +; GFX12-W64-NEXT: s_wait_dscnt 0x0 |
| 72 | +; GFX12-W64-NEXT: s_setpc_b64 s[30:31] |
73 | 73 | entry: |
74 | 74 | %0 = tail call float @llvm.amdgcn.subgroup.shuffle(float %val, i32 %idx) |
75 | 75 | ret float %0 |
|
0 commit comments