blob: 4c5b9c9595161ddea650d8db7f16e5cf5160d3bb [file] [log] [blame]
Tom Stellard49f8bfd2015-01-06 18:00:21 +00001; RUN: llc -march=amdgcn -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
Matt Arsenault4100ebd2014-07-20 07:13:17 +00002
Tom Stellard79243d92014-10-01 17:15:17 +00003; FUNC-LABEL: {{^}}test_concat_v1i32:
Tom Stellard4f575f72014-08-09 01:06:53 +00004; 0x80f000 is the high 32 bits of the resource descriptor used by MUBUF
5; instructions that access scratch memory. Bit 23, which is the add_tid_enable
6; bit, is only set for scratch access, so we can check for the absence of this
7; value if we want to ensure scratch memory is not being used.
Tom Stellard326d6ec2014-11-05 14:50:53 +00008; SI-NOT: s_mov_b32 s{{[0-9]}}, 0x80f000
9; SI-NOT: movrel
Matt Arsenault4100ebd2014-07-20 07:13:17 +000010define void @test_concat_v1i32(<2 x i32> addrspace(1)* %out, <1 x i32> %a, <1 x i32> %b) nounwind {
11 %concat = shufflevector <1 x i32> %a, <1 x i32> %b, <2 x i32> <i32 0, i32 1>
12 store <2 x i32> %concat, <2 x i32> addrspace(1)* %out, align 8
13 ret void
14}
15
Tom Stellard79243d92014-10-01 17:15:17 +000016; FUNC-LABEL: {{^}}test_concat_v2i32:
Tom Stellard326d6ec2014-11-05 14:50:53 +000017; SI-NOT: s_mov_b32 s{{[0-9]}}, 0x80f000
18; SI-NOT: movrel
Matt Arsenault4100ebd2014-07-20 07:13:17 +000019define void @test_concat_v2i32(<4 x i32> addrspace(1)* %out, <2 x i32> %a, <2 x i32> %b) nounwind {
20 %concat = shufflevector <2 x i32> %a, <2 x i32> %b, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
21 store <4 x i32> %concat, <4 x i32> addrspace(1)* %out, align 16
22 ret void
23}
24
Tom Stellard79243d92014-10-01 17:15:17 +000025; FUNC-LABEL: {{^}}test_concat_v4i32:
Tom Stellard326d6ec2014-11-05 14:50:53 +000026; SI-NOT: s_mov_b32 s{{[0-9]}}, 0x80f000
27; SI-NOT: movrel
Matt Arsenault4100ebd2014-07-20 07:13:17 +000028define void @test_concat_v4i32(<8 x i32> addrspace(1)* %out, <4 x i32> %a, <4 x i32> %b) nounwind {
29 %concat = shufflevector <4 x i32> %a, <4 x i32> %b, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
30 store <8 x i32> %concat, <8 x i32> addrspace(1)* %out, align 32
31 ret void
32}
33
Tom Stellard79243d92014-10-01 17:15:17 +000034; FUNC-LABEL: {{^}}test_concat_v8i32:
Tom Stellard326d6ec2014-11-05 14:50:53 +000035; SI-NOT: s_mov_b32 s{{[0-9]}}, 0x80f000
36; SI-NOT: movrel
Matt Arsenault4100ebd2014-07-20 07:13:17 +000037define void @test_concat_v8i32(<16 x i32> addrspace(1)* %out, <8 x i32> %a, <8 x i32> %b) nounwind {
38 %concat = shufflevector <8 x i32> %a, <8 x i32> %b, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
39 store <16 x i32> %concat, <16 x i32> addrspace(1)* %out, align 64
40 ret void
41}
42
Tom Stellard79243d92014-10-01 17:15:17 +000043; FUNC-LABEL: {{^}}test_concat_v16i32:
Tom Stellard326d6ec2014-11-05 14:50:53 +000044; SI-NOT: s_mov_b32 s{{[0-9]}}, 0x80f000
45; SI-NOT: movrel
Matt Arsenault4100ebd2014-07-20 07:13:17 +000046define void @test_concat_v16i32(<32 x i32> addrspace(1)* %out, <16 x i32> %a, <16 x i32> %b) nounwind {
47 %concat = shufflevector <16 x i32> %a, <16 x i32> %b, <32 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>
48 store <32 x i32> %concat, <32 x i32> addrspace(1)* %out, align 128
49 ret void
50}
51
Tom Stellard79243d92014-10-01 17:15:17 +000052; FUNC-LABEL: {{^}}test_concat_v1f32:
Tom Stellard326d6ec2014-11-05 14:50:53 +000053; SI-NOT: s_mov_b32 s{{[0-9]}}, 0x80f000
54; SI-NOT: movrel
Matt Arsenault4100ebd2014-07-20 07:13:17 +000055define void @test_concat_v1f32(<2 x float> addrspace(1)* %out, <1 x float> %a, <1 x float> %b) nounwind {
56 %concat = shufflevector <1 x float> %a, <1 x float> %b, <2 x i32> <i32 0, i32 1>
57 store <2 x float> %concat, <2 x float> addrspace(1)* %out, align 8
58 ret void
59}
60
Tom Stellard79243d92014-10-01 17:15:17 +000061; FUNC-LABEL: {{^}}test_concat_v2f32:
Tom Stellard326d6ec2014-11-05 14:50:53 +000062; SI-NOT: s_mov_b32 s{{[0-9]}}, 0x80f000
63; SI-NOT: movrel
Matt Arsenault4100ebd2014-07-20 07:13:17 +000064define void @test_concat_v2f32(<4 x float> addrspace(1)* %out, <2 x float> %a, <2 x float> %b) nounwind {
65 %concat = shufflevector <2 x float> %a, <2 x float> %b, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
66 store <4 x float> %concat, <4 x float> addrspace(1)* %out, align 16
67 ret void
68}
69
Tom Stellard79243d92014-10-01 17:15:17 +000070; FUNC-LABEL: {{^}}test_concat_v4f32:
Tom Stellard326d6ec2014-11-05 14:50:53 +000071; SI-NOT: s_mov_b32 s{{[0-9]}}, 0x80f000
72; SI-NOT: movrel
Matt Arsenault4100ebd2014-07-20 07:13:17 +000073define void @test_concat_v4f32(<8 x float> addrspace(1)* %out, <4 x float> %a, <4 x float> %b) nounwind {
74 %concat = shufflevector <4 x float> %a, <4 x float> %b, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
75 store <8 x float> %concat, <8 x float> addrspace(1)* %out, align 32
76 ret void
77}
78
Tom Stellard79243d92014-10-01 17:15:17 +000079; FUNC-LABEL: {{^}}test_concat_v8f32:
Tom Stellard326d6ec2014-11-05 14:50:53 +000080; SI-NOT: s_mov_b32 s{{[0-9]}}, 0x80f000
81; SI-NOT: movrel
Matt Arsenault4100ebd2014-07-20 07:13:17 +000082define void @test_concat_v8f32(<16 x float> addrspace(1)* %out, <8 x float> %a, <8 x float> %b) nounwind {
83 %concat = shufflevector <8 x float> %a, <8 x float> %b, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
84 store <16 x float> %concat, <16 x float> addrspace(1)* %out, align 64
85 ret void
86}
87
Tom Stellard79243d92014-10-01 17:15:17 +000088; FUNC-LABEL: {{^}}test_concat_v16f32:
Tom Stellard326d6ec2014-11-05 14:50:53 +000089; SI-NOT: s_mov_b32 s{{[0-9]}}, 0x80f000
90; SI-NOT: movrel
Matt Arsenault4100ebd2014-07-20 07:13:17 +000091define void @test_concat_v16f32(<32 x float> addrspace(1)* %out, <16 x float> %a, <16 x float> %b) nounwind {
92 %concat = shufflevector <16 x float> %a, <16 x float> %b, <32 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>
93 store <32 x float> %concat, <32 x float> addrspace(1)* %out, align 128
94 ret void
95}
96
Tom Stellard79243d92014-10-01 17:15:17 +000097; FUNC-LABEL: {{^}}test_concat_v1i64:
Tom Stellard326d6ec2014-11-05 14:50:53 +000098; SI-NOT: s_mov_b32 s{{[0-9]}}, 0x80f000
99; SI-NOT: movrel
Matt Arsenault4100ebd2014-07-20 07:13:17 +0000100define void @test_concat_v1i64(<2 x double> addrspace(1)* %out, <1 x double> %a, <1 x double> %b) nounwind {
101 %concat = shufflevector <1 x double> %a, <1 x double> %b, <2 x i32> <i32 0, i32 1>
102 store <2 x double> %concat, <2 x double> addrspace(1)* %out, align 16
103 ret void
104}
105
Tom Stellard79243d92014-10-01 17:15:17 +0000106; FUNC-LABEL: {{^}}test_concat_v2i64:
Tom Stellard326d6ec2014-11-05 14:50:53 +0000107; SI-NOT: s_mov_b32 s{{[0-9]}}, 0x80f000
108; SI-NOT: movrel
Matt Arsenault4100ebd2014-07-20 07:13:17 +0000109define void @test_concat_v2i64(<4 x double> addrspace(1)* %out, <2 x double> %a, <2 x double> %b) nounwind {
110 %concat = shufflevector <2 x double> %a, <2 x double> %b, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
111 store <4 x double> %concat, <4 x double> addrspace(1)* %out, align 32
112 ret void
113}
114
Tom Stellard79243d92014-10-01 17:15:17 +0000115; FUNC-LABEL: {{^}}test_concat_v4i64:
Tom Stellard326d6ec2014-11-05 14:50:53 +0000116; SI-NOT: s_mov_b32 s{{[0-9]}}, 0x80f000
117; SI-NOT: movrel
Matt Arsenault4100ebd2014-07-20 07:13:17 +0000118define void @test_concat_v4i64(<8 x double> addrspace(1)* %out, <4 x double> %a, <4 x double> %b) nounwind {
119 %concat = shufflevector <4 x double> %a, <4 x double> %b, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
120 store <8 x double> %concat, <8 x double> addrspace(1)* %out, align 64
121 ret void
122}
123
Tom Stellard79243d92014-10-01 17:15:17 +0000124; FUNC-LABEL: {{^}}test_concat_v8i64:
Tom Stellard326d6ec2014-11-05 14:50:53 +0000125; SI-NOT: s_mov_b32 s{{[0-9]}}, 0x80f000
126; SI-NOT: movrel
Matt Arsenault4100ebd2014-07-20 07:13:17 +0000127define void @test_concat_v8i64(<16 x double> addrspace(1)* %out, <8 x double> %a, <8 x double> %b) nounwind {
128 %concat = shufflevector <8 x double> %a, <8 x double> %b, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
129 store <16 x double> %concat, <16 x double> addrspace(1)* %out, align 128
130 ret void
131}
132
Tom Stellard79243d92014-10-01 17:15:17 +0000133; FUNC-LABEL: {{^}}test_concat_v16i64:
Tom Stellard326d6ec2014-11-05 14:50:53 +0000134; SI-NOT: s_mov_b32 s{{[0-9]}}, 0x80f000
135; SI-NOT: movrel
Matt Arsenault4100ebd2014-07-20 07:13:17 +0000136define void @test_concat_v16i64(<32 x double> addrspace(1)* %out, <16 x double> %a, <16 x double> %b) nounwind {
137 %concat = shufflevector <16 x double> %a, <16 x double> %b, <32 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>
138 store <32 x double> %concat, <32 x double> addrspace(1)* %out, align 256
139 ret void
140}
141
Tom Stellard79243d92014-10-01 17:15:17 +0000142; FUNC-LABEL: {{^}}test_concat_v1f64:
Tom Stellard326d6ec2014-11-05 14:50:53 +0000143; SI-NOT: s_mov_b32 s{{[0-9]}}, 0x80f000
144; SI-NOT: movrel
Matt Arsenault4100ebd2014-07-20 07:13:17 +0000145define void @test_concat_v1f64(<2 x double> addrspace(1)* %out, <1 x double> %a, <1 x double> %b) nounwind {
146 %concat = shufflevector <1 x double> %a, <1 x double> %b, <2 x i32> <i32 0, i32 1>
147 store <2 x double> %concat, <2 x double> addrspace(1)* %out, align 16
148 ret void
149}
150
Tom Stellard79243d92014-10-01 17:15:17 +0000151; FUNC-LABEL: {{^}}test_concat_v2f64:
Tom Stellard326d6ec2014-11-05 14:50:53 +0000152; SI-NOT: s_mov_b32 s{{[0-9]}}, 0x80f000
153; SI-NOT: movrel
Matt Arsenault4100ebd2014-07-20 07:13:17 +0000154define void @test_concat_v2f64(<4 x double> addrspace(1)* %out, <2 x double> %a, <2 x double> %b) nounwind {
155 %concat = shufflevector <2 x double> %a, <2 x double> %b, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
156 store <4 x double> %concat, <4 x double> addrspace(1)* %out, align 32
157 ret void
158}
159
Tom Stellard79243d92014-10-01 17:15:17 +0000160; FUNC-LABEL: {{^}}test_concat_v4f64:
Tom Stellard326d6ec2014-11-05 14:50:53 +0000161; SI-NOT: s_mov_b32 s{{[0-9]}}, 0x80f000
162; SI-NOT: movrel
Matt Arsenault4100ebd2014-07-20 07:13:17 +0000163define void @test_concat_v4f64(<8 x double> addrspace(1)* %out, <4 x double> %a, <4 x double> %b) nounwind {
164 %concat = shufflevector <4 x double> %a, <4 x double> %b, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
165 store <8 x double> %concat, <8 x double> addrspace(1)* %out, align 64
166 ret void
167}
168
Tom Stellard79243d92014-10-01 17:15:17 +0000169; FUNC-LABEL: {{^}}test_concat_v8f64:
Tom Stellard326d6ec2014-11-05 14:50:53 +0000170; SI-NOT: s_mov_b32 s{{[0-9]}}, 0x80f000
171; SI-NOT: movrel
Matt Arsenault4100ebd2014-07-20 07:13:17 +0000172define void @test_concat_v8f64(<16 x double> addrspace(1)* %out, <8 x double> %a, <8 x double> %b) nounwind {
173 %concat = shufflevector <8 x double> %a, <8 x double> %b, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
174 store <16 x double> %concat, <16 x double> addrspace(1)* %out, align 128
175 ret void
176}
177
Tom Stellard79243d92014-10-01 17:15:17 +0000178; FUNC-LABEL: {{^}}test_concat_v16f64:
Tom Stellard326d6ec2014-11-05 14:50:53 +0000179; SI-NOT: s_mov_b32 s{{[0-9]}}, 0x80f000
180; SI-NOT: movrel
Matt Arsenault4100ebd2014-07-20 07:13:17 +0000181define void @test_concat_v16f64(<32 x double> addrspace(1)* %out, <16 x double> %a, <16 x double> %b) nounwind {
182 %concat = shufflevector <16 x double> %a, <16 x double> %b, <32 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>
183 store <32 x double> %concat, <32 x double> addrspace(1)* %out, align 256
184 ret void
185}
186
Tom Stellard79243d92014-10-01 17:15:17 +0000187; FUNC-LABEL: {{^}}test_concat_v1i1:
Tom Stellard326d6ec2014-11-05 14:50:53 +0000188; SI-NOT: s_mov_b32 s{{[0-9]}}, 0x80f000
189; SI-NOT: movrel
Matt Arsenault4100ebd2014-07-20 07:13:17 +0000190define void @test_concat_v1i1(<2 x i1> addrspace(1)* %out, <1 x i1> %a, <1 x i1> %b) nounwind {
191 %concat = shufflevector <1 x i1> %a, <1 x i1> %b, <2 x i32> <i32 0, i32 1>
192 store <2 x i1> %concat, <2 x i1> addrspace(1)* %out
193 ret void
194}
195
Tom Stellard79243d92014-10-01 17:15:17 +0000196; FUNC-LABEL: {{^}}test_concat_v2i1:
Tom Stellard326d6ec2014-11-05 14:50:53 +0000197; SI-NOT: s_mov_b32 s{{[0-9]}}, 0x80f000
198; SI-NOT: movrel
Matt Arsenault4100ebd2014-07-20 07:13:17 +0000199define void @test_concat_v2i1(<4 x i1> addrspace(1)* %out, <2 x i1> %a, <2 x i1> %b) nounwind {
200 %concat = shufflevector <2 x i1> %a, <2 x i1> %b, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
201 store <4 x i1> %concat, <4 x i1> addrspace(1)* %out
202 ret void
203}
204
Tom Stellard79243d92014-10-01 17:15:17 +0000205; FUNC-LABEL: {{^}}test_concat_v4i1:
Tom Stellard326d6ec2014-11-05 14:50:53 +0000206; SI-NOT: s_mov_b32 s{{[0-9]}}, 0x80f000
207; SI-NOT: movrel
Matt Arsenault4100ebd2014-07-20 07:13:17 +0000208define void @test_concat_v4i1(<8 x i1> addrspace(1)* %out, <4 x i1> %a, <4 x i1> %b) nounwind {
209 %concat = shufflevector <4 x i1> %a, <4 x i1> %b, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
210 store <8 x i1> %concat, <8 x i1> addrspace(1)* %out
211 ret void
212}
213
Tom Stellard79243d92014-10-01 17:15:17 +0000214; FUNC-LABEL: {{^}}test_concat_v8i1:
Tom Stellard326d6ec2014-11-05 14:50:53 +0000215; SI-NOT: s_mov_b32 s{{[0-9]}}, 0x80f000
216; SI-NOT: movrel
Matt Arsenault4100ebd2014-07-20 07:13:17 +0000217define void @test_concat_v8i1(<16 x i1> addrspace(1)* %out, <8 x i1> %a, <8 x i1> %b) nounwind {
218 %concat = shufflevector <8 x i1> %a, <8 x i1> %b, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
219 store <16 x i1> %concat, <16 x i1> addrspace(1)* %out
220 ret void
221}
222
Tom Stellard79243d92014-10-01 17:15:17 +0000223; FUNC-LABEL: {{^}}test_concat_v16i1:
Tom Stellard326d6ec2014-11-05 14:50:53 +0000224; SI-NOT: s_mov_b32 s{{[0-9]}}, 0x80f000
225; SI-NOT: movrel
Matt Arsenault4100ebd2014-07-20 07:13:17 +0000226define void @test_concat_v16i1(<32 x i1> addrspace(1)* %out, <16 x i1> %a, <16 x i1> %b) nounwind {
227 %concat = shufflevector <16 x i1> %a, <16 x i1> %b, <32 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>
228 store <32 x i1> %concat, <32 x i1> addrspace(1)* %out
229 ret void
230}
231
Tom Stellard79243d92014-10-01 17:15:17 +0000232; FUNC-LABEL: {{^}}test_concat_v32i1:
Tom Stellard326d6ec2014-11-05 14:50:53 +0000233; SI-NOT: s_mov_b32 s{{[0-9]}}, 0x80f000
234; SI-NOT: movrel
Matt Arsenault4100ebd2014-07-20 07:13:17 +0000235define void @test_concat_v32i1(<64 x i1> addrspace(1)* %out, <32 x i1> %a, <32 x i1> %b) nounwind {
236 %concat = shufflevector <32 x i1> %a, <32 x i1> %b, <64 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31, i32 32, i32 33, i32 34, i32 35, i32 36, i32 37, i32 38, i32 39, i32 40, i32 41, i32 42, i32 43, i32 44, i32 45, i32 46, i32 47, i32 48, i32 49, i32 50, i32 51, i32 52, i32 53, i32 54, i32 55, i32 56, i32 57, i32 58, i32 59, i32 60, i32 61, i32 62, i32 63>
237 store <64 x i1> %concat, <64 x i1> addrspace(1)* %out
238 ret void
239}
240
Tom Stellard79243d92014-10-01 17:15:17 +0000241; FUNC-LABEL: {{^}}test_concat_v1i16:
Tom Stellard326d6ec2014-11-05 14:50:53 +0000242; SI-NOT: s_mov_b32 s{{[0-9]}}, 0x80f000
243; SI-NOT: movrel
Matt Arsenault4100ebd2014-07-20 07:13:17 +0000244define void @test_concat_v1i16(<2 x i16> addrspace(1)* %out, <1 x i16> %a, <1 x i16> %b) nounwind {
245 %concat = shufflevector <1 x i16> %a, <1 x i16> %b, <2 x i32> <i32 0, i32 1>
246 store <2 x i16> %concat, <2 x i16> addrspace(1)* %out, align 4
247 ret void
248}
249
Tom Stellard79243d92014-10-01 17:15:17 +0000250; FUNC-LABEL: {{^}}test_concat_v2i16:
Tom Stellard326d6ec2014-11-05 14:50:53 +0000251; SI-NOT: s_mov_b32 s{{[0-9]}}, 0x80f000
252; SI-NOT: movrel
Matt Arsenault4100ebd2014-07-20 07:13:17 +0000253define void @test_concat_v2i16(<4 x i16> addrspace(1)* %out, <2 x i16> %a, <2 x i16> %b) nounwind {
254 %concat = shufflevector <2 x i16> %a, <2 x i16> %b, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
255 store <4 x i16> %concat, <4 x i16> addrspace(1)* %out, align 8
256 ret void
257}
258
Tom Stellard79243d92014-10-01 17:15:17 +0000259; FUNC-LABEL: {{^}}test_concat_v4i16:
Tom Stellard326d6ec2014-11-05 14:50:53 +0000260; SI-NOT: s_mov_b32 s{{[0-9]}}, 0x80f000
261; SI-NOT: movrel
Matt Arsenault4100ebd2014-07-20 07:13:17 +0000262define void @test_concat_v4i16(<8 x i16> addrspace(1)* %out, <4 x i16> %a, <4 x i16> %b) nounwind {
263 %concat = shufflevector <4 x i16> %a, <4 x i16> %b, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
264 store <8 x i16> %concat, <8 x i16> addrspace(1)* %out, align 16
265 ret void
266}
267
Tom Stellard79243d92014-10-01 17:15:17 +0000268; FUNC-LABEL: {{^}}test_concat_v8i16:
Tom Stellard326d6ec2014-11-05 14:50:53 +0000269; SI-NOT: s_mov_b32 s{{[0-9]}}, 0x80f000
270; SI-NOT: movrel
Matt Arsenault4100ebd2014-07-20 07:13:17 +0000271define void @test_concat_v8i16(<16 x i16> addrspace(1)* %out, <8 x i16> %a, <8 x i16> %b) nounwind {
272 %concat = shufflevector <8 x i16> %a, <8 x i16> %b, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
273 store <16 x i16> %concat, <16 x i16> addrspace(1)* %out, align 32
274 ret void
275}
276
Tom Stellard79243d92014-10-01 17:15:17 +0000277; FUNC-LABEL: {{^}}test_concat_v16i16:
Tom Stellard326d6ec2014-11-05 14:50:53 +0000278; SI-NOT: s_mov_b32 s{{[0-9]}}, 0x80f000
279; SI-NOT: movrel
Matt Arsenault4100ebd2014-07-20 07:13:17 +0000280define void @test_concat_v16i16(<32 x i16> addrspace(1)* %out, <16 x i16> %a, <16 x i16> %b) nounwind {
281 %concat = shufflevector <16 x i16> %a, <16 x i16> %b, <32 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>
282 store <32 x i16> %concat, <32 x i16> addrspace(1)* %out, align 64
283 ret void
284}