diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2014-06-24 23:33:04 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2014-06-24 23:33:04 +0000 |
commit | 78d1e952014fd0ed58528ad3a65639d6b6d1077e (patch) | |
tree | ef178aaa7358f9e0ad13496685a906907a53343b /lib/Target | |
parent | e572ec68d261d37faeb7129d1b3fdb68c4f8d6be (diff) | |
download | llvm-78d1e952014fd0ed58528ad3a65639d6b6d1077e.tar.gz llvm-78d1e952014fd0ed58528ad3a65639d6b6d1077e.tar.bz2 llvm-78d1e952014fd0ed58528ad3a65639d6b6d1077e.tar.xz |
R600: Promote i64 stores to v2i32
Now we need only one 64-bit pattern for stores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211643 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/R600/AMDGPUISelLowering.cpp | 3 | ||||
-rw-r--r-- | lib/Target/R600/SIISelLowering.cpp | 7 | ||||
-rw-r--r-- | lib/Target/R600/SIInstructions.td | 3 |
3 files changed, 10 insertions, 3 deletions
diff --git a/lib/Target/R600/AMDGPUISelLowering.cpp b/lib/Target/R600/AMDGPUISelLowering.cpp index f467436a3a..84e78badce 100644 --- a/lib/Target/R600/AMDGPUISelLowering.cpp +++ b/lib/Target/R600/AMDGPUISelLowering.cpp @@ -139,6 +139,9 @@ AMDGPUTargetLowering::AMDGPUTargetLowering(TargetMachine &TM) : setOperationAction(ISD::STORE, MVT::v2f32, Promote); AddPromotedToType(ISD::STORE, MVT::v2f32, MVT::v2i32); + setOperationAction(ISD::STORE, MVT::i64, Promote); + AddPromotedToType(ISD::STORE, MVT::i64, MVT::v2i32); + setOperationAction(ISD::STORE, MVT::v4f32, Promote); AddPromotedToType(ISD::STORE, MVT::v4f32, MVT::v4i32); diff --git a/lib/Target/R600/SIISelLowering.cpp b/lib/Target/R600/SIISelLowering.cpp index 1a61568b5d..29e4b98e84 100644 --- a/lib/Target/R600/SIISelLowering.cpp +++ b/lib/Target/R600/SIISelLowering.cpp @@ -98,7 +98,6 @@ SITargetLowering::SITargetLowering(TargetMachine &TM) : setOperationAction(ISD::STORE, MVT::i1, Custom); setOperationAction(ISD::STORE, MVT::i32, Custom); - setOperationAction(ISD::STORE, MVT::i64, Custom); setOperationAction(ISD::STORE, MVT::v2i32, Custom); setOperationAction(ISD::STORE, MVT::v4i32, Custom); @@ -912,6 +911,12 @@ SDValue SITargetLowering::LowerSTORE(SDValue Op, SelectionDAG &DAG) const { StoreSDNode *Store = cast<StoreSDNode>(Op); EVT VT = Store->getMemoryVT(); + // These stores are legal. + if (Store->getAddressSpace() == AMDGPUAS::LOCAL_ADDRESS && + VT.isVector() && VT.getVectorNumElements() == 2 && + VT.getVectorElementType() == MVT::i32) + return SDValue(); + SDValue Ret = AMDGPUTargetLowering::LowerSTORE(Op, DAG); if (Ret.getNode()) return Ret; diff --git a/lib/Target/R600/SIInstructions.td b/lib/Target/R600/SIInstructions.td index 507cfe8e81..d4d9afd760 100644 --- a/lib/Target/R600/SIInstructions.td +++ b/lib/Target/R600/SIInstructions.td @@ -2389,7 +2389,7 @@ multiclass DSWritePat <DS inst, ValueType vt, PatFrag frag> { defm : DSWritePat <DS_WRITE_B8, i32, truncstorei8_local>; defm : DSWritePat <DS_WRITE_B16, i32, truncstorei16_local>; defm : DSWritePat <DS_WRITE_B32, i32, local_store>; -defm : DSWritePat <DS_WRITE_B64, i64, local_store>; +defm : DSWritePat <DS_WRITE_B64, v2i32, local_store>; multiclass DSAtomicRetPat<DS inst, ValueType vt, PatFrag frag> { def : Pat < @@ -2555,7 +2555,6 @@ multiclass MUBUFStore_Pattern <MUBUF Instr, ValueType vt, PatFrag st> { defm : MUBUFStore_Pattern <BUFFER_STORE_BYTE, i32, truncstorei8_global>; defm : MUBUFStore_Pattern <BUFFER_STORE_SHORT, i32, truncstorei16_global>; defm : MUBUFStore_Pattern <BUFFER_STORE_DWORD, i32, global_store>; -defm : MUBUFStore_Pattern <BUFFER_STORE_DWORDX2, i64, global_store>; defm : MUBUFStore_Pattern <BUFFER_STORE_DWORDX2, v2i32, global_store>; defm : MUBUFStore_Pattern <BUFFER_STORE_DWORDX4, v4i32, global_store>; |