Skip to content

Commit

Permalink
[AMDGPU] Autogenerate & pre-commit tests for D156301 and D157388
Browse files Browse the repository at this point in the history
Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D157712
  • Loading branch information
Pravin Jagtap authored and Pravin Jagtap committed Aug 18, 2023
1 parent 6cfbfb4 commit c931f2e
Show file tree
Hide file tree
Showing 8 changed files with 13,078 additions and 78 deletions.
322 changes: 322 additions & 0 deletions llvm/test/CodeGen/AMDGPU/global_atomic_optimizer_fp_rtn.ll

Large diffs are not rendered by default.

322 changes: 322 additions & 0 deletions llvm/test/CodeGen/AMDGPU/global_atomics_optimizer_fp_no_rtn.ll

Large diffs are not rendered by default.

3,246 changes: 3,246 additions & 0 deletions llvm/test/CodeGen/AMDGPU/global_atomics_scan_fadd.ll

Large diffs are not rendered by default.

2,338 changes: 2,338 additions & 0 deletions llvm/test/CodeGen/AMDGPU/global_atomics_scan_fmax.ll

Large diffs are not rendered by default.

2,338 changes: 2,338 additions & 0 deletions llvm/test/CodeGen/AMDGPU/global_atomics_scan_fmin.ll

Large diffs are not rendered by default.

3,445 changes: 3,445 additions & 0 deletions llvm/test/CodeGen/AMDGPU/global_atomics_scan_fsub.ll

Large diffs are not rendered by default.

1,105 changes: 1,041 additions & 64 deletions llvm/test/CodeGen/AMDGPU/local-atomics-fp.ll

Large diffs are not rendered by default.

40 changes: 26 additions & 14 deletions llvm/test/CodeGen/AMDGPU/shl_add_ptr_global.ll
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx908 -verify-machineinstrs < %s | FileCheck -enable-var-scope --check-prefix=GCN %s

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

; GCN-LABEL: {{^}}shl_base_global_ptr_global_atomic_fadd:
; GCN-DAG: v_add_co_u32_e32 v[[EXTRA_LO:[0-9]+]], vcc, 0x80, v4
; GCN-DAG: v_addc_co_u32_e32 v[[EXTRA_HI:[0-9]+]], vcc, 0, v5, vcc
; GCN-DAG: v_lshlrev_b64 v[[[LO:[0-9]+]]:[[HI:[0-9]+]]], 2, v[4:5]
; GCN-DAG: v_mov_b32_e32 [[K:v[0-9]+]], 0x42c80000
; GCN-DAG: global_atomic_add_f32 v[[[LO]]:[[HI]]], [[K]], off offset:512
; GCN-DAG: global_store_dwordx2 v{{\[[0-9]+:[0-9]+\]}}, v[[[EXTRA_LO]]:[[EXTRA_HI]]]
define void @shl_base_global_ptr_global_atomic_fadd(ptr addrspace(1) %out, ptr addrspace(1) %extra.use, ptr addrspace(1) %ptr) #0 {
; GCN-LABEL: shl_base_global_ptr_global_atomic_fadd:
; GCN: ; %bb.0:
; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-NEXT: v_lshlrev_b64 v[0:1], 2, v[4:5]
; GCN-NEXT: v_mov_b32_e32 v6, 0x42c80000
; GCN-NEXT: global_atomic_add_f32 v[0:1], v6, off offset:512
; GCN-NEXT: v_add_co_u32_e32 v0, vcc, 0x80, v4
; GCN-NEXT: v_addc_co_u32_e32 v1, vcc, 0, v5, vcc
; GCN-NEXT: global_store_dwordx2 v[2:3], v[0:1], off
; GCN-NEXT: s_waitcnt vmcnt(0)
; GCN-NEXT: s_setpc_b64 s[30:31]
%arrayidx0 = getelementptr inbounds [512 x i32], ptr addrspace(1) %ptr, i64 0, i64 32
%cast = ptrtoint ptr addrspace(1) %arrayidx0 to i64
%shl = shl i64 %cast, 2
Expand Down

0 comments on commit c931f2e

Please sign in to comment.