[llvm] 84e035d - AMDGPU: Don't check constant address space for atomic stores
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 24 12:15:32 PST 2020
Author: Matt Arsenault
Date: 2020-01-24T12:15:09-08:00
New Revision: 84e035d8f1d635d202692e3c38c9c96aa1e08088
URL: https://github.com/llvm/llvm-project/commit/84e035d8f1d635d202692e3c38c9c96aa1e08088
DIFF: https://github.com/llvm/llvm-project/commit/84e035d8f1d635d202692e3c38c9c96aa1e08088.diff
LOG: AMDGPU: Don't check constant address space for atomic stores
We define a separate list for storable address spaces. This saves
entry in the matcher table address space list.
Added:
Modified:
llvm/lib/Target/AMDGPU/AMDGPUInstructions.td
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUInstructions.td b/llvm/lib/Target/AMDGPU/AMDGPUInstructions.td
index 7e71dbdd1240..8c4afe0b44ae 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUInstructions.td
+++ b/llvm/lib/Target/AMDGPU/AMDGPUInstructions.td
@@ -408,7 +408,12 @@ def atomic_load_64_#as : PatFrag<(ops node:$ptr), (atomic_load_64 node:$ptr)> {
let IsAtomic = 1;
let MemoryVT = i64;
}
+} // End let AddressSpaces
+} // End foreach as
+
+foreach as = [ "global", "flat", "local", "private", "region" ] in {
+let AddressSpaces = !cast<AddressSpaceList>("StoreAddress_"#as).AddrSpaces in {
def store_#as : PatFrag<(ops node:$val, node:$ptr),
(unindexedstore node:$val, node:$ptr)> {
let IsStore = 1;
@@ -444,8 +449,8 @@ def truncstorei16_hi16_#as : StoreHi16<truncstorei16>;
defm atomic_store_#as : binary_atomic_op<atomic_store>;
-} // End let AddressSpaces = ...
-} // End foreach AddrSpace
+} // End let AddressSpaces
+} // End foreach as
multiclass ret_noret_binary_atomic_op<SDNode atomic_op, bit IsInt = 1> {
More information about the llvm-commits
mailing list