Index: llvm/lib/Target/AMDGPU/AMDGPUInstructions.td =================================================================== --- llvm/lib/Target/AMDGPU/AMDGPUInstructions.td +++ llvm/lib/Target/AMDGPU/AMDGPUInstructions.td @@ -343,8 +343,9 @@ >; class StoreHi16 : PatFrag < - (ops node:$value, node:$ptr), (op (srl node:$value, (i32 16)), node:$ptr) ->; + (ops node:$value, node:$ptr), (op (srl node:$value, (i32 16)), node:$ptr)> { + let IsStore = 1; +} def LoadAddress_constant : AddressSpaceList<[ AddrSpaces.Constant ]>; def LoadAddress_global : AddressSpaceList<[ AddrSpaces.Global, AddrSpaces.Constant ]>; @@ -485,6 +486,10 @@ let MemoryVT = i16; } +def store_hi16_#as : StoreHi16 ; +def truncstorei8_hi16_#as : StoreHi16; +def truncstorei16_hi16_#as : StoreHi16; + defm atomic_store_#as : binary_atomic_op; } // End let AddressSpaces = ... @@ -520,16 +525,7 @@ defm atomic_load_fadd : ret_noret_binary_atomic_op; defm AMDGPUatomic_cmp_swap : ret_noret_binary_atomic_op; - -def store_hi16_private : StoreHi16 , PrivateAddress; -def truncstorei8_hi16_private : StoreHi16, PrivateAddress; - def store_atomic_global : GlobalStore; -def truncstorei8_hi16_global : StoreHi16 , GlobalAddress; -def truncstorei16_hi16_global : StoreHi16 , GlobalAddress; - -def store_local_hi16 : StoreHi16 , LocalAddress; -def truncstorei8_local_hi16 : StoreHi16, LocalAddress; def atomic_store_local : LocalStore ; @@ -559,8 +555,6 @@ def atomic_store_flat : FlatStore ; -def truncstorei8_hi16_flat : StoreHi16, FlatStoreAddress; -def truncstorei16_hi16_flat : StoreHi16, FlatStoreAddress; class local_binary_atomic_op : Index: llvm/lib/Target/AMDGPU/DSInstructions.td =================================================================== --- llvm/lib/Target/AMDGPU/DSInstructions.td +++ llvm/lib/Target/AMDGPU/DSInstructions.td @@ -733,8 +733,8 @@ defm : DSAtomicWritePat_mc ; let OtherPredicates = [D16PreservesUnusedBits] in { -def : DSWritePat ; -def : DSWritePat ; +def : DSWritePat ; +def : DSWritePat ; }