mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-12 23:40:54 +00:00
AMDGPU: Fix missing and broken check lines in atomic tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272343 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e330b7d89a
commit
003d842e7f
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,6 @@
|
||||
; RUN: llc -march=amdgcn -mcpu=bonaire -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=CI %s
|
||||
; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=VI %s
|
||||
|
||||
|
||||
; GCN-LABEL: {{^}}atomic_add_i64_offset:
|
||||
; GCN: buffer_atomic_add_x2 v{{\[[0-9]+:[0-9]+\]}}, off, s[{{[0-9]+}}:{{[0-9]+}}], 0 offset:32{{$}}
|
||||
define void @atomic_add_i64_offset(i64 addrspace(1)* %out, i64 %in) {
|
||||
@ -696,6 +695,7 @@ entry:
|
||||
|
||||
; GCN-LABEL: {{^}}atomic_xchg_i64_addr64_offset:
|
||||
; CI: buffer_atomic_swap_x2 v{{\[[0-9]+:[0-9]+\]}}, v[{{[0-9]+}}:{{[0-9]+}}], s[{{[0-9]+}}:{{[0-9]+}}], 0 addr64 offset:32{{$}}
|
||||
; VI: flat_atomic_swap_x2 v[{{[0-9]+:[0-9]+}}], v{{\[[0-9]+:[0-9]+\]}}{{$}}
|
||||
define void @atomic_xchg_i64_addr64_offset(i64 addrspace(1)* %out, i64 %in, i64 %index) {
|
||||
entry:
|
||||
%ptr = getelementptr i64, i64 addrspace(1)* %out, i64 %index
|
||||
@ -840,3 +840,187 @@ entry:
|
||||
store i64 %tmp0, i64 addrspace(1)* %out2
|
||||
ret void
|
||||
}
|
||||
|
||||
; FUNC-LABEL: {{^}}atomic_load_i64_offset:
|
||||
; CI: buffer_load_dwordx2 [[RET:v\[[0-9]+:[0-9]+\]]], off, s[{{[0-9]+}}:{{[0-9]+}}], 0 offset:32 glc{{$}}
|
||||
; VI: flat_load_dwordx2 [[RET:v\[[0-9]+:[0-9]\]]], v[{{[0-9]+}}:{{[0-9]+}}] glc{{$}}
|
||||
; GCN: buffer_store_dwordx2 [[RET]]
|
||||
define void @atomic_load_i64_offset(i64 addrspace(1)* %in, i64 addrspace(1)* %out) {
|
||||
entry:
|
||||
%gep = getelementptr i64, i64 addrspace(1)* %in, i64 4
|
||||
%val = load atomic i64, i64 addrspace(1)* %gep seq_cst, align 8
|
||||
store i64 %val, i64 addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; FUNC-LABEL: {{^}}atomic_load_i64:
|
||||
; CI: buffer_load_dwordx2 [[RET:v\[[0-9]+:[0-9]\]]], off, s[{{[0-9]+}}:{{[0-9]+}}], 0 glc
|
||||
; VI: flat_load_dwordx2 [[RET:v\[[0-9]+:[0-9]\]]], v[{{[0-9]+}}:{{[0-9]+}}] glc
|
||||
; GCN: buffer_store_dwordx2 [[RET]]
|
||||
define void @atomic_load_i64(i64 addrspace(1)* %in, i64 addrspace(1)* %out) {
|
||||
entry:
|
||||
%val = load atomic i64, i64 addrspace(1)* %in seq_cst, align 8
|
||||
store i64 %val, i64 addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; FUNC-LABEL: {{^}}atomic_load_i64_addr64_offset:
|
||||
; CI: buffer_load_dwordx2 [[RET:v\[[0-9]+:[0-9]+\]]], v[{{[0-9]+}}:{{[0-9]+}}], s[{{[0-9]+}}:{{[0-9]+}}], 0 addr64 offset:32 glc{{$}}
|
||||
; VI: flat_load_dwordx2 [[RET:v\[[0-9]+:[0-9]+\]]], v[{{[0-9]+:[0-9]+}}] glc{{$}}
|
||||
; GCN: buffer_store_dwordx2 [[RET]]
|
||||
define void @atomic_load_i64_addr64_offset(i64 addrspace(1)* %in, i64 addrspace(1)* %out, i64 %index) {
|
||||
entry:
|
||||
%ptr = getelementptr i64, i64 addrspace(1)* %in, i64 %index
|
||||
%gep = getelementptr i64, i64 addrspace(1)* %ptr, i64 4
|
||||
%val = load atomic i64, i64 addrspace(1)* %gep seq_cst, align 8
|
||||
store i64 %val, i64 addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; FUNC-LABEL: {{^}}atomic_load_i64_addr64:
|
||||
; CI: buffer_load_dwordx2 [[RET:v\[[0-9]+:[0-9]\]]], v[{{[0-9]+}}:{{[0-9]+}}], s[{{[0-9]+}}:{{[0-9]+}}], 0 addr64 glc{{$}}
|
||||
; VI: flat_load_dwordx2 [[RET:v\[[0-9]+:[0-9]+\]]], v[{{[0-9]+:[0-9]+}}] glc{{$}}
|
||||
; GCN: buffer_store_dwordx2 [[RET]]
|
||||
define void @atomic_load_i64_addr64(i64 addrspace(1)* %in, i64 addrspace(1)* %out, i64 %index) {
|
||||
entry:
|
||||
%ptr = getelementptr i64, i64 addrspace(1)* %in, i64 %index
|
||||
%val = load atomic i64, i64 addrspace(1)* %ptr seq_cst, align 8
|
||||
store i64 %val, i64 addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; FUNC-LABEL: {{^}}atomic_store_i64_offset:
|
||||
; CI: buffer_store_dwordx2 [[RET:v\[[0-9]+:[0-9]+\]]], off, s[{{[0-9]+}}:{{[0-9]+}}], 0 offset:32 glc{{$}}
|
||||
; VI: flat_store_dwordx2 [[RET:v\[[0-9]+:[0-9]\]]], v[{{[0-9]+}}:{{[0-9]+}}] glc{{$}}
|
||||
define void @atomic_store_i64_offset(i64 %in, i64 addrspace(1)* %out) {
|
||||
entry:
|
||||
%gep = getelementptr i64, i64 addrspace(1)* %out, i64 4
|
||||
store atomic i64 %in, i64 addrspace(1)* %gep seq_cst, align 8
|
||||
ret void
|
||||
}
|
||||
|
||||
; FUNC-LABEL: {{^}}atomic_store_i64:
|
||||
; CI: buffer_store_dwordx2 {{v\[[0-9]+:[0-9]\]}}, off, s[{{[0-9]+}}:{{[0-9]+}}], 0 glc
|
||||
; VI: flat_store_dwordx2 {{v\[[0-9]+:[0-9]\]}}, v[{{[0-9]+}}:{{[0-9]+}}] glc
|
||||
define void @atomic_store_i64(i64 %in, i64 addrspace(1)* %out) {
|
||||
entry:
|
||||
store atomic i64 %in, i64 addrspace(1)* %out seq_cst, align 8
|
||||
ret void
|
||||
}
|
||||
|
||||
; FUNC-LABEL: {{^}}atomic_store_i64_addr64_offset:
|
||||
; CI: buffer_store_dwordx2 {{v\[[0-9]+:[0-9]+\]}}, v[{{[0-9]+}}:{{[0-9]+}}], s[{{[0-9]+}}:{{[0-9]+}}], 0 addr64 offset:32 glc{{$}}
|
||||
; VI: flat_store_dwordx2 {{v\[[0-9]+:[0-9]+\]}}, v[{{[0-9]+:[0-9]+}}] glc{{$}}
|
||||
define void @atomic_store_i64_addr64_offset(i64 %in, i64 addrspace(1)* %out, i64 %index) {
|
||||
entry:
|
||||
%ptr = getelementptr i64, i64 addrspace(1)* %out, i64 %index
|
||||
%gep = getelementptr i64, i64 addrspace(1)* %ptr, i64 4
|
||||
store atomic i64 %in, i64 addrspace(1)* %gep seq_cst, align 8
|
||||
ret void
|
||||
}
|
||||
|
||||
; FUNC-LABEL: {{^}}atomic_store_i64_addr64:
|
||||
; CI: buffer_store_dwordx2 {{v\[[0-9]+:[0-9]\]}}, v[{{[0-9]+}}:{{[0-9]+}}], s[{{[0-9]+}}:{{[0-9]+}}], 0 addr64 glc{{$}}
|
||||
; VI: flat_store_dwordx2 {{v\[[0-9]+:[0-9]+\]}}, v[{{[0-9]+:[0-9]+}}] glc{{$}}
|
||||
define void @atomic_store_i64_addr64(i64 %in, i64 addrspace(1)* %out, i64 %index) {
|
||||
entry:
|
||||
%ptr = getelementptr i64, i64 addrspace(1)* %out, i64 %index
|
||||
store atomic i64 %in, i64 addrspace(1)* %ptr seq_cst, align 8
|
||||
ret void
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
; FUNC-LABEL: {{^}}atomic_cmpxchg_i64_offset:
|
||||
; GCN: buffer_atomic_cmpswapx2 v[{{[0-9]+}}:{{[0-9]+}}], off, s[{{[0-9]+}}:{{[0-9]+}}], 0 offset:16{{$}}
|
||||
define void @atomic_cmpxchg_i64_offset(i64 addrspace(1)* %out, i64 %in, i64 %old) {
|
||||
entry:
|
||||
%gep = getelementptr i64, i64 addrspace(1)* %out, i64 4
|
||||
%val = cmpxchg volatile i64 addrspace(1)* %gep, i64 %old, i64 %in seq_cst seq_cst
|
||||
ret void
|
||||
}
|
||||
|
||||
; FUNC-LABEL: {{^}}atomic_cmpxchg_i64_ret_offset:
|
||||
; GCN: buffer_atomic_cmpswapx2 v{{\[}}[[RET:[0-9]+]]{{:[0-9]+}}], off, s[{{[0-9]+}}:{{[0-9]+}}], 0 offset:16 glc{{$}}
|
||||
; GCN: buffer_store_dwordx2 v[[RET]]
|
||||
define void @atomic_cmpxchg_i64_ret_offset(i64 addrspace(1)* %out, i64 addrspace(1)* %out2, i64 %in, i64 %old) {
|
||||
entry:
|
||||
%gep = getelementptr i64, i64 addrspace(1)* %out, i64 4
|
||||
%val = cmpxchg volatile i64 addrspace(1)* %gep, i64 %old, i64 %in seq_cst seq_cst
|
||||
%extract0 = extractvalue { i64, i1 } %val, 0
|
||||
store i64 %extract0, i64 addrspace(1)* %out2
|
||||
ret void
|
||||
}
|
||||
|
||||
; FUNC-LABEL: {{^}}atomic_cmpxchg_i64_addr64_offset:
|
||||
; SI: buffer_atomic_cmpswapx2 v[{{[0-9]+\:[0-9]+}}], v[{{[0-9]+}}:{{[0-9]+}}], s[{{[0-9]+}}:{{[0-9]+}}], 0 addr64 offset:16{{$}}
|
||||
|
||||
; VI: flat_atomic_cmpswapx2 v[{{[0-9]+\:[0-9]+}}], v[{{[0-9]+}}:{{[0-9]+}}]{{$}}
|
||||
define void @atomic_cmpxchg_i64_addr64_offset(i64 addrspace(1)* %out, i64 %in, i64 %index, i64 %old) {
|
||||
entry:
|
||||
%ptr = getelementptr i64, i64 addrspace(1)* %out, i64 %index
|
||||
%gep = getelementptr i64, i64 addrspace(1)* %ptr, i64 4
|
||||
%val = cmpxchg volatile i64 addrspace(1)* %gep, i64 %old, i64 %in seq_cst seq_cst
|
||||
ret void
|
||||
}
|
||||
|
||||
; FUNC-LABEL: {{^}}atomic_cmpxchg_i64_ret_addr64_offset:
|
||||
; SI: buffer_atomic_cmpswapx2 v{{\[}}[[RET:[0-9]+]]:{{[0-9]+}}], v[{{[0-9]+}}:{{[0-9]+}}], s[{{[0-9]+}}:{{[0-9]+}}], 0 addr64 offset:16 glc{{$}}
|
||||
; VI: flat_atomic_cmpswapx2 v[[RET:[0-9]+]], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}] glc{{$}}
|
||||
; GCN: buffer_store_dword v[[RET]]
|
||||
define void @atomic_cmpxchg_i64_ret_addr64_offset(i64 addrspace(1)* %out, i64 addrspace(1)* %out2, i64 %in, i64 %index, i64 %old) {
|
||||
entry:
|
||||
%ptr = getelementptr i64, i64 addrspace(1)* %out, i64 %index
|
||||
%gep = getelementptr i64, i64 addrspace(1)* %ptr, i64 4
|
||||
%val = cmpxchg volatile i64 addrspace(1)* %gep, i64 %old, i64 %in seq_cst seq_cst
|
||||
%extract0 = extractvalue { i64, i1 } %val, 0
|
||||
store i64 %extract0, i64 addrspace(1)* %out2
|
||||
ret void
|
||||
}
|
||||
|
||||
; FUNC-LABEL: {{^}}atomic_cmpxchg_i64:
|
||||
; GCN: buffer_atomic_cmpswap v[{{[0-9]+:[0-9]+}}], off, s[{{[0-9]+}}:{{[0-9]+}}], 0{{$}}
|
||||
define void @atomic_cmpxchg_i64(i64 addrspace(1)* %out, i64 %in, i64 %old) {
|
||||
entry:
|
||||
%val = cmpxchg volatile i64 addrspace(1)* %out, i64 %old, i64 %in seq_cst seq_cst
|
||||
ret void
|
||||
}
|
||||
|
||||
; FUNC-LABEL: {{^}}atomic_cmpxchg_i64_ret:
|
||||
; GCN: buffer_atomic_cmpswap v{{\[}}[[RET:[0-9]+]]:{{[0-9]+}}], off, s[{{[0-9]+}}:{{[0-9]+}}], 0 glc
|
||||
; GCN: buffer_store_dword v[[RET]]
|
||||
define void @atomic_cmpxchg_i64_ret(i64 addrspace(1)* %out, i64 addrspace(1)* %out2, i64 %in, i64 %old) {
|
||||
entry:
|
||||
%val = cmpxchg volatile i64 addrspace(1)* %out, i64 %old, i64 %in seq_cst seq_cst
|
||||
%extract0 = extractvalue { i64, i1 } %val, 0
|
||||
store i64 %extract0, i64 addrspace(1)* %out2
|
||||
ret void
|
||||
}
|
||||
|
||||
; FUNC-LABEL: {{^}}atomic_cmpxchg_i64_addr64:
|
||||
; SI: buffer_atomic_cmpswap v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+}}:{{[0-9]+}}], s[{{[0-9]+}}:{{[0-9]+}}], 0 addr64{{$}}
|
||||
; VI: flat_atomic_cmpswap v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}]{{$}}
|
||||
define void @atomic_cmpxchg_i64_addr64(i64 addrspace(1)* %out, i64 %in, i64 %index, i64 %old) {
|
||||
entry:
|
||||
%ptr = getelementptr i64, i64 addrspace(1)* %out, i64 %index
|
||||
%val = cmpxchg volatile i64 addrspace(1)* %ptr, i64 %old, i64 %in seq_cst seq_cst
|
||||
ret void
|
||||
}
|
||||
|
||||
; FUNC-LABEL: {{^}}atomic_cmpxchg_i64_ret_addr64:
|
||||
; SI: buffer_atomic_cmpswap v{{\[}}[[RET:[0-9]+]]:{{[0-9]+}}], v[{{[0-9]+}}:{{[0-9]+}}], s[{{[0-9]+}}:{{[0-9]+}}], 0 addr64 glc{{$}}
|
||||
; VI: flat_atomic_cmpswap v[[RET:[0-9]+]], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}] glc{{$}}
|
||||
; GCN: buffer_store_dword v[[RET]]
|
||||
define void @atomic_cmpxchg_i64_ret_addr64(i64 addrspace(1)* %out, i64 addrspace(1)* %out2, i64 %in, i64 %index, i64 %old) {
|
||||
entry:
|
||||
%ptr = getelementptr i64, i64 addrspace(1)* %out, i64 %index
|
||||
%val = cmpxchg volatile i64 addrspace(1)* %ptr, i64 %old, i64 %in seq_cst seq_cst
|
||||
%extract0 = extractvalue { i64, i1 } %val, 0
|
||||
store i64 %extract0, i64 addrspace(1)* %out2
|
||||
ret void
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user