|
1 | 1 | ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
2 |
| -; RUN: llc -global-isel=0 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1250 < %s | FileCheck -check-prefixes=GFX1250,GFX1250-SDAG %s |
3 |
| -; RUN: llc -global-isel=1 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1250 < %s | FileCheck -check-prefixes=GFX1250,GFX1250-GISEL %s |
| 2 | +; RUN: llc -global-isel=0 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1250 < %s | FileCheck -check-prefixes=GCN,GFX1250,GFX1250-SDAG %s |
| 3 | +; RUN: llc -global-isel=0 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1251 < %s | FileCheck -check-prefixes=GCN,GFX1251,GFX1251-SDAG %s |
| 4 | + |
| 5 | +; RUN: llc -global-isel=1 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1250 < %s | FileCheck -check-prefixes=GCN,GFX1250,GFX1250-GISEL %s |
| 6 | +; RUN: llc -global-isel=1 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1251 < %s | FileCheck -check-prefixes=GCN,GFX1251,GFX1251-GISEL %s |
| 7 | + |
| 8 | +; this test has both gfx1250/1251 run lines to check availability of the intrinsic on both variants. |
4 | 9 |
|
5 | 10 | ; test behavior with unsupported 'consume' and 'acq_rel' ordering
|
6 | 11 |
|
7 | 12 | define i32 @test_load_consume(ptr noundef readonly %addr) {
|
8 |
| -; GFX1250-LABEL: test_load_consume: |
9 |
| -; GFX1250: ; %bb.0: ; %entry |
10 |
| -; GFX1250-NEXT: s_wait_loadcnt_dscnt 0x0 |
11 |
| -; GFX1250-NEXT: s_wait_kmcnt 0x0 |
12 |
| -; GFX1250-NEXT: flat_load_b32 v0, v[0:1] scope:SCOPE_SYS |
13 |
| -; GFX1250-NEXT: s_wait_loadcnt_dscnt 0x0 |
14 |
| -; GFX1250-NEXT: s_set_pc_i64 s[30:31] |
| 13 | +; GCN-LABEL: test_load_consume: |
| 14 | +; GCN: ; %bb.0: ; %entry |
| 15 | +; GCN-NEXT: s_wait_loadcnt_dscnt 0x0 |
| 16 | +; GCN-NEXT: s_wait_kmcnt 0x0 |
| 17 | +; GCN-NEXT: flat_load_b32 v0, v[0:1] scope:SCOPE_SYS |
| 18 | +; GCN-NEXT: s_wait_loadcnt_dscnt 0x0 |
| 19 | +; GCN-NEXT: s_set_pc_i64 s[30:31] |
15 | 20 | entry:
|
16 | 21 | %0 = tail call i32 @llvm.amdgcn.cooperative.atomic.load.32x4B.p0(ptr %addr, i32 1, metadata !0)
|
17 | 22 | ret i32 %0
|
18 | 23 | }
|
19 | 24 |
|
20 | 25 | define i32 @test_load_acqrel(ptr noundef readonly %addr) {
|
21 |
| -; GFX1250-LABEL: test_load_acqrel: |
22 |
| -; GFX1250: ; %bb.0: ; %entry |
23 |
| -; GFX1250-NEXT: s_wait_loadcnt_dscnt 0x0 |
24 |
| -; GFX1250-NEXT: s_wait_kmcnt 0x0 |
25 |
| -; GFX1250-NEXT: flat_load_b32 v0, v[0:1] scope:SCOPE_SYS |
26 |
| -; GFX1250-NEXT: s_wait_loadcnt_dscnt 0x0 |
27 |
| -; GFX1250-NEXT: s_set_pc_i64 s[30:31] |
| 26 | +; GCN-LABEL: test_load_acqrel: |
| 27 | +; GCN: ; %bb.0: ; %entry |
| 28 | +; GCN-NEXT: s_wait_loadcnt_dscnt 0x0 |
| 29 | +; GCN-NEXT: s_wait_kmcnt 0x0 |
| 30 | +; GCN-NEXT: flat_load_b32 v0, v[0:1] scope:SCOPE_SYS |
| 31 | +; GCN-NEXT: s_wait_loadcnt_dscnt 0x0 |
| 32 | +; GCN-NEXT: s_set_pc_i64 s[30:31] |
28 | 33 | entry:
|
29 | 34 | %0 = tail call i32 @llvm.amdgcn.cooperative.atomic.load.32x4B.p0(ptr %addr, i32 4, metadata !0)
|
30 | 35 | ret i32 %0
|
31 | 36 | }
|
32 | 37 |
|
33 | 38 | define void @test_store_acqrel(ptr noundef %addr, i32 noundef %val) {
|
34 |
| -; GFX1250-LABEL: test_store_acqrel: |
35 |
| -; GFX1250: ; %bb.0: ; %entry |
36 |
| -; GFX1250-NEXT: s_wait_loadcnt_dscnt 0x0 |
37 |
| -; GFX1250-NEXT: s_wait_kmcnt 0x0 |
38 |
| -; GFX1250-NEXT: flat_store_b32 v[0:1], v2 scope:SCOPE_SYS |
39 |
| -; GFX1250-NEXT: s_wait_dscnt 0x0 |
40 |
| -; GFX1250-NEXT: s_set_pc_i64 s[30:31] |
| 39 | +; GCN-LABEL: test_store_acqrel: |
| 40 | +; GCN: ; %bb.0: ; %entry |
| 41 | +; GCN-NEXT: s_wait_loadcnt_dscnt 0x0 |
| 42 | +; GCN-NEXT: s_wait_kmcnt 0x0 |
| 43 | +; GCN-NEXT: flat_store_b32 v[0:1], v2 scope:SCOPE_SYS |
| 44 | +; GCN-NEXT: s_wait_dscnt 0x0 |
| 45 | +; GCN-NEXT: s_set_pc_i64 s[30:31] |
41 | 46 | entry:
|
42 | 47 | tail call void @llvm.amdgcn.cooperative.atomic.store.32x4B.p0(ptr %addr, i32 %val, i32 4, metadata !0)
|
43 | 48 | ret void
|
44 | 49 | }
|
45 | 50 |
|
46 | 51 | !0 = !{ !"" }
|
| 52 | + |
47 | 53 | ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
|
| 54 | +; GFX1250: {{.*}} |
48 | 55 | ; GFX1250-GISEL: {{.*}}
|
49 | 56 | ; GFX1250-SDAG: {{.*}}
|
| 57 | +; GFX1251: {{.*}} |
| 58 | +; GFX1251-GISEL: {{.*}} |
| 59 | +; GFX1251-SDAG: {{.*}} |
0 commit comments