llvm.org GIT mirror llvm / ad24102
Merging r243731: ------------------------------------------------------------------------ r243731 | Matthew.Arsenault | 2015-07-31 00:12:04 -0400 (Fri, 31 Jul 2015) | 2 lines AMDGPU: Fix v16i32 to v16i8 truncstore ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@253231 91177308-0d34-0410-b5e6-96231b3b80d8 Tom Stellard 3 years ago
2 changed file(s) with 49 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
156156
157157 setTruncStoreAction(MVT::i64, MVT::i32, Expand);
158158 setTruncStoreAction(MVT::v8i32, MVT::v8i16, Expand);
159 setTruncStoreAction(MVT::v16i32, MVT::v16i8, Expand);
159160 setTruncStoreAction(MVT::v16i32, MVT::v16i16, Expand);
160161
161162 setOperationAction(ISD::LOAD, MVT::i1, Custom);
0 ; RUN: llc -march=amdgcn -mcpu=verde -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
1 ; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
2
3 ; FUNC-LABEL: {{^}}truncstore_arg_v16i32_to_v16i8:
4 ; SI: buffer_store_byte
5 ; SI: buffer_store_byte
6 ; SI: buffer_store_byte
7 ; SI: buffer_store_byte
8 ; SI: buffer_store_byte
9 ; SI: buffer_store_byte
10 ; SI: buffer_store_byte
11 ; SI: buffer_store_byte
12 ; SI: buffer_store_byte
13 ; SI: buffer_store_byte
14 ; SI: buffer_store_byte
15 ; SI: buffer_store_byte
16 ; SI: buffer_store_byte
17 ; SI: buffer_store_byte
18 ; SI: buffer_store_byte
19 ; SI: buffer_store_byte
20 define void @truncstore_arg_v16i32_to_v16i8(<16 x i8> addrspace(1)* %out, <16 x i32> %in) {
21 %trunc = trunc <16 x i32> %in to <16 x i8>
22 store <16 x i8> %trunc, <16 x i8> addrspace(1)* %out
23 ret void
24 }
25
26 ; FUNC-LABEL: {{^}}truncstore_arg_v16i64_to_v16i8:
27 ; SI: buffer_store_byte
28 ; SI: buffer_store_byte
29 ; SI: buffer_store_byte
30 ; SI: buffer_store_byte
31 ; SI: buffer_store_byte
32 ; SI: buffer_store_byte
33 ; SI: buffer_store_byte
34 ; SI: buffer_store_byte
35 ; SI: buffer_store_byte
36 ; SI: buffer_store_byte
37 ; SI: buffer_store_byte
38 ; SI: buffer_store_byte
39 ; SI: buffer_store_byte
40 ; SI: buffer_store_byte
41 ; SI: buffer_store_byte
42 ; SI: buffer_store_byte
43 define void @truncstore_arg_v16i64_to_v16i8(<16 x i8> addrspace(1)* %out, <16 x i64> %in) {
44 %trunc = trunc <16 x i64> %in to <16 x i8>
45 store <16 x i8> %trunc, <16 x i8> addrspace(1)* %out
46 ret void
47 }