summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2015-07-31 04:12:04 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2015-07-31 04:12:04 +0000
commite1ce344b5aed0e915e86dae9db834b6a9826bd68 (patch)
tree5bbacbc71451b6b0cca8903e62e0b14539da0620 /llvm/test
parenta0832b5743713a947b5590cc68d59a570d88e180 (diff)
downloadbcm5719-llvm-e1ce344b5aed0e915e86dae9db834b6a9826bd68.tar.gz
bcm5719-llvm-e1ce344b5aed0e915e86dae9db834b6a9826bd68.zip
AMDGPU: Fix v16i32 to v16i8 truncstore
llvm-svn: 243731
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/AMDGPU/trunc-store.ll48
1 files changed, 48 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/trunc-store.ll b/llvm/test/CodeGen/AMDGPU/trunc-store.ll
new file mode 100644
index 00000000000..4ba815f2669
--- /dev/null
+++ b/llvm/test/CodeGen/AMDGPU/trunc-store.ll
@@ -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
+}
OpenPOWER on IntegriCloud