[llvm-branch-commits] [llvm-branch] r253231 - Merging r243731:

Tom Stellard via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Nov 16 09:23:25 PST 2015


Author: tstellar
Date: Mon Nov 16 11:23:25 2015
New Revision: 253231

URL: http://llvm.org/viewvc/llvm-project?rev=253231&view=rev
Log:
Merging r243731:

------------------------------------------------------------------------
r243731 | Matthew.Arsenault | 2015-07-31 00:12:04 -0400 (Fri, 31 Jul 2015) | 2 lines

AMDGPU: Fix v16i32 to v16i8 truncstore

------------------------------------------------------------------------

Added:
    llvm/branches/release_37/test/CodeGen/AMDGPU/trunc-store.ll
Modified:
    llvm/branches/release_37/lib/Target/AMDGPU/SIISelLowering.cpp

Modified: llvm/branches/release_37/lib/Target/AMDGPU/SIISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_37/lib/Target/AMDGPU/SIISelLowering.cpp?rev=253231&r1=253230&r2=253231&view=diff
==============================================================================
--- llvm/branches/release_37/lib/Target/AMDGPU/SIISelLowering.cpp (original)
+++ llvm/branches/release_37/lib/Target/AMDGPU/SIISelLowering.cpp Mon Nov 16 11:23:25 2015
@@ -157,6 +157,7 @@ SITargetLowering::SITargetLowering(Targe
 
   setTruncStoreAction(MVT::i64, MVT::i32, Expand);
   setTruncStoreAction(MVT::v8i32, MVT::v8i16, Expand);
+  setTruncStoreAction(MVT::v16i32, MVT::v16i8, Expand);
   setTruncStoreAction(MVT::v16i32, MVT::v16i16, Expand);
 
   setOperationAction(ISD::LOAD, MVT::i1, Custom);

Added: llvm/branches/release_37/test/CodeGen/AMDGPU/trunc-store.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_37/test/CodeGen/AMDGPU/trunc-store.ll?rev=253231&view=auto
==============================================================================
--- llvm/branches/release_37/test/CodeGen/AMDGPU/trunc-store.ll (added)
+++ llvm/branches/release_37/test/CodeGen/AMDGPU/trunc-store.ll Mon Nov 16 11:23:25 2015
@@ -0,0 +1,48 @@
+; RUN: llc -march=amdgcn -mcpu=verde -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
+; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
+
+; FUNC-LABEL: {{^}}truncstore_arg_v16i32_to_v16i8:
+; SI: buffer_store_byte
+; SI: buffer_store_byte
+; SI: buffer_store_byte
+; SI: buffer_store_byte
+; SI: buffer_store_byte
+; SI: buffer_store_byte
+; SI: buffer_store_byte
+; SI: buffer_store_byte
+; SI: buffer_store_byte
+; SI: buffer_store_byte
+; SI: buffer_store_byte
+; SI: buffer_store_byte
+; SI: buffer_store_byte
+; SI: buffer_store_byte
+; SI: buffer_store_byte
+; SI: buffer_store_byte
+define void @truncstore_arg_v16i32_to_v16i8(<16 x i8> addrspace(1)* %out, <16 x i32> %in) {
+  %trunc = trunc <16 x i32> %in to <16 x i8>
+  store <16 x i8> %trunc, <16 x i8> addrspace(1)* %out
+  ret void
+}
+
+; FUNC-LABEL: {{^}}truncstore_arg_v16i64_to_v16i8:
+; SI: buffer_store_byte
+; SI: buffer_store_byte
+; SI: buffer_store_byte
+; SI: buffer_store_byte
+; SI: buffer_store_byte
+; SI: buffer_store_byte
+; SI: buffer_store_byte
+; SI: buffer_store_byte
+; SI: buffer_store_byte
+; SI: buffer_store_byte
+; SI: buffer_store_byte
+; SI: buffer_store_byte
+; SI: buffer_store_byte
+; SI: buffer_store_byte
+; SI: buffer_store_byte
+; SI: buffer_store_byte
+define void @truncstore_arg_v16i64_to_v16i8(<16 x i8> addrspace(1)* %out, <16 x i64> %in) {
+  %trunc = trunc <16 x i64> %in to <16 x i8>
+  store <16 x i8> %trunc, <16 x i8> addrspace(1)* %out
+  ret void
+}




More information about the llvm-branch-commits mailing list