diff options
-rw-r--r-- | lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp | 2 | ||||
-rw-r--r-- | test/CodeGen/R600/store.ll | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp b/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp index fd5f977..52990c3 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp @@ -1270,7 +1270,7 @@ SDValue DAGTypeLegalizer::SplitVecOp_STORE(StoreSDNode *N, unsigned OpNo) { // Increment the pointer to the other half. Ptr = DAG.getNode(ISD::ADD, DL, Ptr.getValueType(), Ptr, - DAG.getIntPtrConstant(IncrementSize)); + DAG.getConstant(IncrementSize, Ptr.getValueType())); if (isTruncating) Hi = DAG.getTruncStore(Ch, DL, Hi, Ptr, diff --git a/test/CodeGen/R600/store.ll b/test/CodeGen/R600/store.ll index 50c91b4..2609dab 100644 --- a/test/CodeGen/R600/store.ll +++ b/test/CodeGen/R600/store.ll @@ -202,6 +202,21 @@ entry: ret void } +; EG-CHECK: @store_local_v4i8 +; EG-CHECK: LDS_WRITE +; CM-CHECK: @store_local_v4i8 +; CM-CHECK: LDS_WRITE +; SI-CHECK: @store_local_v4i8 +; SI-CHECK: DS_WRITE_B8 +; SI-CHECK: DS_WRITE_B8 +; SI-CHECK: DS_WRITE_B8 +; SI-CHECK: DS_WRITE_B8 +define void @store_local_v4i8(<4 x i8> addrspace(3)* %out, <4 x i8> %in) { +entry: + store <4 x i8> %in, <4 x i8> addrspace(3)* %out + ret void +} + ; EG-CHECK: @store_local_v2i32 ; EG-CHECK: LDS_WRITE ; EG-CHECK: LDS_WRITE |