mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-10 02:36:06 +00:00
R600: Test local atomics for evergreen
Now that the operations are all implemented, we can test this sub-arch here. Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Matt Arsenault <matthew.arsenault@amd.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217595 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c71f7e46bd
commit
1ff44854f6
@ -1,7 +1,9 @@
|
||||
; RUN: llc -march=r600 -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
|
||||
; RUN: llc -march=r600 -mcpu=bonaire -verify-machineinstrs < %s | FileCheck -check-prefix=CI -check-prefix=FUNC %s
|
||||
; RUN: llc -march=r600 -mcpu=redwood -verify-machineinstrs < %s | FileCheck -check-prefix=EG -check-prefix=FUNC %s
|
||||
|
||||
; FUNC-LABEL: @lds_atomic_xchg_ret_i32:
|
||||
; EG: LDS_WRXCHG_RET *
|
||||
; SI: S_LOAD_DWORD [[SPTR:s[0-9]+]],
|
||||
; SI: V_MOV_B32_e32 [[DATA:v[0-9]+]], 4
|
||||
; SI: V_MOV_B32_e32 [[VPTR:v[0-9]+]], [[SPTR]]
|
||||
@ -15,6 +17,7 @@ define void @lds_atomic_xchg_ret_i32(i32 addrspace(1)* %out, i32 addrspace(3)* %
|
||||
}
|
||||
|
||||
; FUNC-LABEL: @lds_atomic_xchg_ret_i32_offset:
|
||||
; EG: LDS_WRXCHG_RET *
|
||||
; SI: DS_WRXCHG_RTN_B32 v{{[0-9]+}}, v{{[0-9]+}}, v{{[0-9]+}}, 0x10
|
||||
; SI: S_ENDPGM
|
||||
define void @lds_atomic_xchg_ret_i32_offset(i32 addrspace(1)* %out, i32 addrspace(3)* %ptr) nounwind {
|
||||
@ -26,6 +29,7 @@ define void @lds_atomic_xchg_ret_i32_offset(i32 addrspace(1)* %out, i32 addrspac
|
||||
|
||||
; XXX - Is it really necessary to load 4 into VGPR?
|
||||
; FUNC-LABEL: @lds_atomic_add_ret_i32:
|
||||
; EG: LDS_ADD_RET *
|
||||
; SI: S_LOAD_DWORD [[SPTR:s[0-9]+]],
|
||||
; SI: V_MOV_B32_e32 [[DATA:v[0-9]+]], 4
|
||||
; SI: V_MOV_B32_e32 [[VPTR:v[0-9]+]], [[SPTR]]
|
||||
@ -39,6 +43,7 @@ define void @lds_atomic_add_ret_i32(i32 addrspace(1)* %out, i32 addrspace(3)* %p
|
||||
}
|
||||
|
||||
; FUNC-LABEL: @lds_atomic_add_ret_i32_offset:
|
||||
; EG: LDS_ADD_RET *
|
||||
; SI: DS_ADD_RTN_U32 v{{[0-9]+}}, v{{[0-9]+}}, v{{[0-9]+}}, 0x10
|
||||
; SI: S_ENDPGM
|
||||
define void @lds_atomic_add_ret_i32_offset(i32 addrspace(1)* %out, i32 addrspace(3)* %ptr) nounwind {
|
||||
@ -49,6 +54,7 @@ define void @lds_atomic_add_ret_i32_offset(i32 addrspace(1)* %out, i32 addrspace
|
||||
}
|
||||
|
||||
; FUNC-LABEL: @lds_atomic_add_ret_i32_bad_si_offset
|
||||
; EG: LDS_ADD_RET *
|
||||
; SI: DS_ADD_RTN_U32 v{{[0-9]+}}, v{{[0-9]+}}, v{{[0-9]+}}, 0x0
|
||||
; CI: DS_ADD_RTN_U32 v{{[0-9]+}}, v{{[0-9]+}}, v{{[0-9]+}}, 0x10
|
||||
; SI: S_ENDPGM
|
||||
@ -62,6 +68,7 @@ define void @lds_atomic_add_ret_i32_bad_si_offset(i32 addrspace(1)* %out, i32 ad
|
||||
}
|
||||
|
||||
; FUNC-LABEL: @lds_atomic_inc_ret_i32:
|
||||
; EG: LDS_ADD_RET *
|
||||
; SI: S_MOV_B32 [[SNEGONE:s[0-9]+]], -1
|
||||
; SI: V_MOV_B32_e32 [[NEGONE:v[0-9]+]], [[SNEGONE]]
|
||||
; SI: DS_INC_RTN_U32 v{{[0-9]+}}, v{{[0-9]+}}, [[NEGONE]], 0x0
|
||||
@ -73,6 +80,7 @@ define void @lds_atomic_inc_ret_i32(i32 addrspace(1)* %out, i32 addrspace(3)* %p
|
||||
}
|
||||
|
||||
; FUNC-LABEL: @lds_atomic_inc_ret_i32_offset:
|
||||
; EG: LDS_ADD_RET *
|
||||
; SI: S_MOV_B32 [[SNEGONE:s[0-9]+]], -1
|
||||
; SI: V_MOV_B32_e32 [[NEGONE:v[0-9]+]], [[SNEGONE]]
|
||||
; SI: DS_INC_RTN_U32 v{{[0-9]+}}, v{{[0-9]+}}, [[NEGONE]], 0x10
|
||||
@ -85,6 +93,7 @@ define void @lds_atomic_inc_ret_i32_offset(i32 addrspace(1)* %out, i32 addrspace
|
||||
}
|
||||
|
||||
; FUNC-LABEL: @lds_atomic_inc_ret_i32_bad_si_offset:
|
||||
; EG: LDS_ADD_RET *
|
||||
; SI: DS_INC_RTN_U32 v{{[0-9]+}}, v{{[0-9]+}}, v{{[0-9]+}}, 0x0
|
||||
; CI: DS_INC_RTN_U32 v{{[0-9]+}}, v{{[0-9]+}}, v{{[0-9]+}}, 0x10
|
||||
; SI: S_ENDPGM
|
||||
@ -98,6 +107,7 @@ define void @lds_atomic_inc_ret_i32_bad_si_offset(i32 addrspace(1)* %out, i32 ad
|
||||
}
|
||||
|
||||
; FUNC-LABEL: @lds_atomic_sub_ret_i32:
|
||||
; EG: LDS_SUB_RET *
|
||||
; SI: DS_SUB_RTN_U32
|
||||
; SI: S_ENDPGM
|
||||
define void @lds_atomic_sub_ret_i32(i32 addrspace(1)* %out, i32 addrspace(3)* %ptr) nounwind {
|
||||
@ -107,6 +117,7 @@ define void @lds_atomic_sub_ret_i32(i32 addrspace(1)* %out, i32 addrspace(3)* %p
|
||||
}
|
||||
|
||||
; FUNC-LABEL: @lds_atomic_sub_ret_i32_offset:
|
||||
; EG: LDS_SUB_RET *
|
||||
; SI: DS_SUB_RTN_U32 v{{[0-9]+}}, v{{[0-9]+}}, v{{[0-9]+}}, 0x10
|
||||
; SI: S_ENDPGM
|
||||
define void @lds_atomic_sub_ret_i32_offset(i32 addrspace(1)* %out, i32 addrspace(3)* %ptr) nounwind {
|
||||
@ -117,6 +128,7 @@ define void @lds_atomic_sub_ret_i32_offset(i32 addrspace(1)* %out, i32 addrspace
|
||||
}
|
||||
|
||||
; FUNC-LABEL: @lds_atomic_dec_ret_i32:
|
||||
; EG: LDS_SUB_RET *
|
||||
; SI: S_MOV_B32 [[SNEGONE:s[0-9]+]], -1
|
||||
; SI: V_MOV_B32_e32 [[NEGONE:v[0-9]+]], [[SNEGONE]]
|
||||
; SI: DS_DEC_RTN_U32 v{{[0-9]+}}, v{{[0-9]+}}, [[NEGONE]], 0x0
|
||||
@ -128,6 +140,7 @@ define void @lds_atomic_dec_ret_i32(i32 addrspace(1)* %out, i32 addrspace(3)* %p
|
||||
}
|
||||
|
||||
; FUNC-LABEL: @lds_atomic_dec_ret_i32_offset:
|
||||
; EG: LDS_SUB_RET *
|
||||
; SI: S_MOV_B32 [[SNEGONE:s[0-9]+]], -1
|
||||
; SI: V_MOV_B32_e32 [[NEGONE:v[0-9]+]], [[SNEGONE]]
|
||||
; SI: DS_DEC_RTN_U32 v{{[0-9]+}}, v{{[0-9]+}}, [[NEGONE]], 0x10
|
||||
@ -140,6 +153,7 @@ define void @lds_atomic_dec_ret_i32_offset(i32 addrspace(1)* %out, i32 addrspace
|
||||
}
|
||||
|
||||
; FUNC-LABEL: @lds_atomic_and_ret_i32:
|
||||
; EG: LDS_AND_RET *
|
||||
; SI: DS_AND_RTN_B32
|
||||
; SI: S_ENDPGM
|
||||
define void @lds_atomic_and_ret_i32(i32 addrspace(1)* %out, i32 addrspace(3)* %ptr) nounwind {
|
||||
@ -149,6 +163,7 @@ define void @lds_atomic_and_ret_i32(i32 addrspace(1)* %out, i32 addrspace(3)* %p
|
||||
}
|
||||
|
||||
; FUNC-LABEL: @lds_atomic_and_ret_i32_offset:
|
||||
; EG: LDS_AND_RET *
|
||||
; SI: DS_AND_RTN_B32 v{{[0-9]+}}, v{{[0-9]+}}, v{{[0-9]+}}, 0x10
|
||||
; SI: S_ENDPGM
|
||||
define void @lds_atomic_and_ret_i32_offset(i32 addrspace(1)* %out, i32 addrspace(3)* %ptr) nounwind {
|
||||
@ -159,6 +174,7 @@ define void @lds_atomic_and_ret_i32_offset(i32 addrspace(1)* %out, i32 addrspace
|
||||
}
|
||||
|
||||
; FUNC-LABEL: @lds_atomic_or_ret_i32:
|
||||
; EG: LDS_OR_RET *
|
||||
; SI: DS_OR_RTN_B32
|
||||
; SI: S_ENDPGM
|
||||
define void @lds_atomic_or_ret_i32(i32 addrspace(1)* %out, i32 addrspace(3)* %ptr) nounwind {
|
||||
@ -168,6 +184,7 @@ define void @lds_atomic_or_ret_i32(i32 addrspace(1)* %out, i32 addrspace(3)* %pt
|
||||
}
|
||||
|
||||
; FUNC-LABEL: @lds_atomic_or_ret_i32_offset:
|
||||
; EG: LDS_OR_RET *
|
||||
; SI: DS_OR_RTN_B32 v{{[0-9]+}}, v{{[0-9]+}}, v{{[0-9]+}}, 0x10
|
||||
; SI: S_ENDPGM
|
||||
define void @lds_atomic_or_ret_i32_offset(i32 addrspace(1)* %out, i32 addrspace(3)* %ptr) nounwind {
|
||||
@ -178,6 +195,7 @@ define void @lds_atomic_or_ret_i32_offset(i32 addrspace(1)* %out, i32 addrspace(
|
||||
}
|
||||
|
||||
; FUNC-LABEL: @lds_atomic_xor_ret_i32:
|
||||
; EG: LDS_XOR_RET *
|
||||
; SI: DS_XOR_RTN_B32
|
||||
; SI: S_ENDPGM
|
||||
define void @lds_atomic_xor_ret_i32(i32 addrspace(1)* %out, i32 addrspace(3)* %ptr) nounwind {
|
||||
@ -187,6 +205,7 @@ define void @lds_atomic_xor_ret_i32(i32 addrspace(1)* %out, i32 addrspace(3)* %p
|
||||
}
|
||||
|
||||
; FUNC-LABEL: @lds_atomic_xor_ret_i32_offset:
|
||||
; EG: LDS_XOR_RET *
|
||||
; SI: DS_XOR_RTN_B32 v{{[0-9]+}}, v{{[0-9]+}}, v{{[0-9]+}}, 0x10
|
||||
; SI: S_ENDPGM
|
||||
define void @lds_atomic_xor_ret_i32_offset(i32 addrspace(1)* %out, i32 addrspace(3)* %ptr) nounwind {
|
||||
@ -205,6 +224,7 @@ define void @lds_atomic_xor_ret_i32_offset(i32 addrspace(1)* %out, i32 addrspace
|
||||
; }
|
||||
|
||||
; FUNC-LABEL: @lds_atomic_min_ret_i32:
|
||||
; EG: LDS_MIN_INT_RET *
|
||||
; SI: DS_MIN_RTN_I32
|
||||
; SI: S_ENDPGM
|
||||
define void @lds_atomic_min_ret_i32(i32 addrspace(1)* %out, i32 addrspace(3)* %ptr) nounwind {
|
||||
@ -214,6 +234,7 @@ define void @lds_atomic_min_ret_i32(i32 addrspace(1)* %out, i32 addrspace(3)* %p
|
||||
}
|
||||
|
||||
; FUNC-LABEL: @lds_atomic_min_ret_i32_offset:
|
||||
; EG: LDS_MIN_INT_RET *
|
||||
; SI: DS_MIN_RTN_I32 v{{[0-9]+}}, v{{[0-9]+}}, v{{[0-9]+}}, 0x10
|
||||
; SI: S_ENDPGM
|
||||
define void @lds_atomic_min_ret_i32_offset(i32 addrspace(1)* %out, i32 addrspace(3)* %ptr) nounwind {
|
||||
@ -224,6 +245,7 @@ define void @lds_atomic_min_ret_i32_offset(i32 addrspace(1)* %out, i32 addrspace
|
||||
}
|
||||
|
||||
; FUNC-LABEL: @lds_atomic_max_ret_i32:
|
||||
; EG: LDS_MAX_INT_RET *
|
||||
; SI: DS_MAX_RTN_I32
|
||||
; SI: S_ENDPGM
|
||||
define void @lds_atomic_max_ret_i32(i32 addrspace(1)* %out, i32 addrspace(3)* %ptr) nounwind {
|
||||
@ -233,6 +255,7 @@ define void @lds_atomic_max_ret_i32(i32 addrspace(1)* %out, i32 addrspace(3)* %p
|
||||
}
|
||||
|
||||
; FUNC-LABEL: @lds_atomic_max_ret_i32_offset:
|
||||
; EG: LDS_MAX_INT_RET *
|
||||
; SI: DS_MAX_RTN_I32 v{{[0-9]+}}, v{{[0-9]+}}, v{{[0-9]+}}, 0x10
|
||||
; SI: S_ENDPGM
|
||||
define void @lds_atomic_max_ret_i32_offset(i32 addrspace(1)* %out, i32 addrspace(3)* %ptr) nounwind {
|
||||
@ -243,6 +266,7 @@ define void @lds_atomic_max_ret_i32_offset(i32 addrspace(1)* %out, i32 addrspace
|
||||
}
|
||||
|
||||
; FUNC-LABEL: @lds_atomic_umin_ret_i32:
|
||||
; EG: LDS_MIN_UINT_RET *
|
||||
; SI: DS_MIN_RTN_U32
|
||||
; SI: S_ENDPGM
|
||||
define void @lds_atomic_umin_ret_i32(i32 addrspace(1)* %out, i32 addrspace(3)* %ptr) nounwind {
|
||||
@ -252,6 +276,7 @@ define void @lds_atomic_umin_ret_i32(i32 addrspace(1)* %out, i32 addrspace(3)* %
|
||||
}
|
||||
|
||||
; FUNC-LABEL: @lds_atomic_umin_ret_i32_offset:
|
||||
; EG: LDS_MIN_UINT_RET *
|
||||
; SI: DS_MIN_RTN_U32 v{{[0-9]+}}, v{{[0-9]+}}, v{{[0-9]+}}, 0x10
|
||||
; SI: S_ENDPGM
|
||||
define void @lds_atomic_umin_ret_i32_offset(i32 addrspace(1)* %out, i32 addrspace(3)* %ptr) nounwind {
|
||||
@ -262,6 +287,7 @@ define void @lds_atomic_umin_ret_i32_offset(i32 addrspace(1)* %out, i32 addrspac
|
||||
}
|
||||
|
||||
; FUNC-LABEL: @lds_atomic_umax_ret_i32:
|
||||
; EG: LDS_MAX_UINT_RET *
|
||||
; SI: DS_MAX_RTN_U32
|
||||
; SI: S_ENDPGM
|
||||
define void @lds_atomic_umax_ret_i32(i32 addrspace(1)* %out, i32 addrspace(3)* %ptr) nounwind {
|
||||
@ -271,6 +297,7 @@ define void @lds_atomic_umax_ret_i32(i32 addrspace(1)* %out, i32 addrspace(3)* %
|
||||
}
|
||||
|
||||
; FUNC-LABEL: @lds_atomic_umax_ret_i32_offset:
|
||||
; EG: LDS_MAX_UINT_RET *
|
||||
; SI: DS_MAX_RTN_U32 v{{[0-9]+}}, v{{[0-9]+}}, v{{[0-9]+}}, 0x10
|
||||
; SI: S_ENDPGM
|
||||
define void @lds_atomic_umax_ret_i32_offset(i32 addrspace(1)* %out, i32 addrspace(3)* %ptr) nounwind {
|
||||
|
Loading…
x
Reference in New Issue
Block a user