Skip to content

Commit c931f2e

Browse files
committed
[AMDGPU] Autogenerate & pre-commit tests for D156301 and D157388
Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D157712
1 parent 6cfbfb4 commit c931f2e

8 files changed

+13078
-78
lines changed

llvm/test/CodeGen/AMDGPU/global_atomic_optimizer_fp_rtn.ll

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

llvm/test/CodeGen/AMDGPU/global_atomics_optimizer_fp_no_rtn.ll

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

llvm/test/CodeGen/AMDGPU/global_atomics_scan_fadd.ll

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

llvm/test/CodeGen/AMDGPU/global_atomics_scan_fmax.ll

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

llvm/test/CodeGen/AMDGPU/global_atomics_scan_fmin.ll

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

llvm/test/CodeGen/AMDGPU/global_atomics_scan_fsub.ll

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

llvm/test/CodeGen/AMDGPU/local-atomics-fp.ll

Lines changed: 1041 additions & 64 deletions
Large diffs are not rendered by default.

llvm/test/CodeGen/AMDGPU/shl_add_ptr_global.ll

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
12
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx908 -verify-machineinstrs < %s | FileCheck -enable-var-scope --check-prefix=GCN %s
23

3-
; GCN-LABEL: {{^}}shl_base_atomicrmw_global_ptr:
4-
; GCN-DAG: v_add_co_u32_e32 v[[EXTRA_LO:[0-9]+]], vcc, 0x80, v4
5-
; GCN-DAG: v_addc_co_u32_e32 v[[EXTRA_HI:[0-9]+]], vcc, 0, v5, vcc
6-
; GCN-DAG: v_lshlrev_b64 v[[[LO:[0-9]+]]:[[HI:[0-9]+]]], 2, v[4:5]
7-
; GCN-DAG: v_mov_b32_e32 [[THREE:v[0-9]+]], 3
8-
; GCN-DAG: global_atomic_and v[[[LO]]:[[HI]]], [[THREE]], off offset:512
9-
; GCN-DAG: global_store_dwordx2 v{{\[[0-9]+:[0-9]+\]}}, v[[[EXTRA_LO]]:[[EXTRA_HI]]]
104
define void @shl_base_atomicrmw_global_ptr(ptr addrspace(1) %out, ptr addrspace(1) %extra.use, ptr addrspace(1) %ptr) #0 {
5+
; GCN-LABEL: shl_base_atomicrmw_global_ptr:
6+
; GCN: ; %bb.0:
7+
; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
8+
; GCN-NEXT: v_lshlrev_b64 v[0:1], 2, v[4:5]
9+
; GCN-NEXT: v_mov_b32_e32 v6, 3
10+
; GCN-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
11+
; GCN-NEXT: global_atomic_and v[0:1], v6, off offset:512
12+
; GCN-NEXT: s_waitcnt vmcnt(0)
13+
; GCN-NEXT: buffer_wbinvl1_vol
14+
; GCN-NEXT: v_add_co_u32_e32 v0, vcc, 0x80, v4
15+
; GCN-NEXT: v_addc_co_u32_e32 v1, vcc, 0, v5, vcc
16+
; GCN-NEXT: global_store_dwordx2 v[2:3], v[0:1], off
17+
; GCN-NEXT: s_waitcnt vmcnt(0)
18+
; GCN-NEXT: s_setpc_b64 s[30:31]
1119
%arrayidx0 = getelementptr inbounds [512 x i32], ptr addrspace(1) %ptr, i64 0, i64 32
1220
%cast = ptrtoint ptr addrspace(1) %arrayidx0 to i64
1321
%shl = shl i64 %cast, 2
@@ -17,14 +25,18 @@ define void @shl_base_atomicrmw_global_ptr(ptr addrspace(1) %out, ptr addrspace(
1725
ret void
1826
}
1927

20-
; GCN-LABEL: {{^}}shl_base_global_ptr_global_atomic_fadd:
21-
; GCN-DAG: v_add_co_u32_e32 v[[EXTRA_LO:[0-9]+]], vcc, 0x80, v4
22-
; GCN-DAG: v_addc_co_u32_e32 v[[EXTRA_HI:[0-9]+]], vcc, 0, v5, vcc
23-
; GCN-DAG: v_lshlrev_b64 v[[[LO:[0-9]+]]:[[HI:[0-9]+]]], 2, v[4:5]
24-
; GCN-DAG: v_mov_b32_e32 [[K:v[0-9]+]], 0x42c80000
25-
; GCN-DAG: global_atomic_add_f32 v[[[LO]]:[[HI]]], [[K]], off offset:512
26-
; GCN-DAG: global_store_dwordx2 v{{\[[0-9]+:[0-9]+\]}}, v[[[EXTRA_LO]]:[[EXTRA_HI]]]
2728
define void @shl_base_global_ptr_global_atomic_fadd(ptr addrspace(1) %out, ptr addrspace(1) %extra.use, ptr addrspace(1) %ptr) #0 {
29+
; GCN-LABEL: shl_base_global_ptr_global_atomic_fadd:
30+
; GCN: ; %bb.0:
31+
; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
32+
; GCN-NEXT: v_lshlrev_b64 v[0:1], 2, v[4:5]
33+
; GCN-NEXT: v_mov_b32_e32 v6, 0x42c80000
34+
; GCN-NEXT: global_atomic_add_f32 v[0:1], v6, off offset:512
35+
; GCN-NEXT: v_add_co_u32_e32 v0, vcc, 0x80, v4
36+
; GCN-NEXT: v_addc_co_u32_e32 v1, vcc, 0, v5, vcc
37+
; GCN-NEXT: global_store_dwordx2 v[2:3], v[0:1], off
38+
; GCN-NEXT: s_waitcnt vmcnt(0)
39+
; GCN-NEXT: s_setpc_b64 s[30:31]
2840
%arrayidx0 = getelementptr inbounds [512 x i32], ptr addrspace(1) %ptr, i64 0, i64 32
2941
%cast = ptrtoint ptr addrspace(1) %arrayidx0 to i64
3042
%shl = shl i64 %cast, 2

0 commit comments

Comments
 (0)