diff options
author | Aaron Watry <awatry@gmail.com> | 2013-09-06 20:17:42 +0000 |
---|---|---|
committer | Aaron Watry <awatry@gmail.com> | 2013-09-06 20:17:42 +0000 |
commit | 546dcc5ddc6d3c1fee50f10bedfea239a721f0e3 (patch) | |
tree | 9e19a9286dd9857ba9396da50ffc1c09d3be29ca /lib/Target/R600/SIInstructions.td | |
parent | e42279cda481b48138d2119f4a4bbce7077f0a72 (diff) | |
download | llvm-546dcc5ddc6d3c1fee50f10bedfea239a721f0e3.tar.gz llvm-546dcc5ddc6d3c1fee50f10bedfea239a721f0e3.tar.bz2 llvm-546dcc5ddc6d3c1fee50f10bedfea239a721f0e3.tar.xz |
R600: Add support for LDS atomic subtract
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190200 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/R600/SIInstructions.td')
-rw-r--r-- | lib/Target/R600/SIInstructions.td | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/R600/SIInstructions.td b/lib/Target/R600/SIInstructions.td index 31a5ad237e..14a189a07a 100644 --- a/lib/Target/R600/SIInstructions.td +++ b/lib/Target/R600/SIInstructions.td @@ -392,6 +392,7 @@ defm V_CMPX_CLASS_F64 : VOPC_64 <0x000000b8, "V_CMPX_CLASS_F64">; } // End isCompare = 1 def DS_ADD_U32_RTN : DS_1A1D_RET <0x20, "DS_ADD_U32_RTN", VReg_32>; +def DS_SUB_U32_RTN : DS_1A1D_RET <0x21, "DS_SUB_U32_RTN", VReg_32>; def DS_WRITE_B32 : DS_Store_Helper <0x0000000d, "DS_WRITE_B32", VReg_32>; def DS_WRITE_B8 : DS_Store_Helper <0x00000001e, "DS_WRITE_B8", VReg_32>; def DS_WRITE_B16 : DS_Store_Helper <0x00000001f, "DS_WRITE_B16", VReg_32>; @@ -1779,6 +1780,9 @@ def : DSWritePat <DS_WRITE_B32, i32, local_store>; def : Pat <(atomic_load_add_local i32:$ptr, i32:$val), (DS_ADD_U32_RTN 0, $ptr, $val, 0, 0)>; +def : Pat <(atomic_load_sub_local i32:$ptr, i32:$val), + (DS_SUB_U32_RTN 0, $ptr, $val, 0, 0)>; + /********** ================== **********/ /********** SMRD Patterns **********/ /********** ================== **********/ |