1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=skylake | FileCheck %s --check-prefixes=CHECK,CHECK-AVX2,CHECK-SKL
3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=x86-64-v3 | FileCheck %s --check-prefixes=CHECK,CHECK-AVX2,CHECK-V3
4 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=icelake-server | FileCheck %s --check-prefixes=CHECK,CHECK-ICX,CHECK-ICX-NO-BYPASS-DELAY
5 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=icelake-server -mattr=-no-bypass-delay-shuffle | FileCheck %s --check-prefixes=CHECK,CHECK-ICX,CHECK-ICX-BYPASS-DELAY
6 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=sandybridge -mattr=+no-bypass-delay-shuffle | FileCheck %s --check-prefixes=CHECK,CHECK-SNB,CHECK-SNB-NO-BYPASS-DELAY
7 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=sandybridge -mattr=-no-bypass-delay-shuffle | FileCheck %s --check-prefixes=CHECK,CHECK-SNB,CHECK-SNB-BYPASS-DELAY
10 define <8 x float> @transform_VUNPCKLPSYrr(<8 x float> %a, <8 x float> %b) nounwind {
11 ; CHECK-AVX2-LABEL: transform_VUNPCKLPSYrr:
12 ; CHECK-AVX2: # %bb.0:
13 ; CHECK-AVX2-NEXT: vunpcklps {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
14 ; CHECK-AVX2-NEXT: retq
16 ; CHECK-ICX-NO-BYPASS-DELAY-LABEL: transform_VUNPCKLPSYrr:
17 ; CHECK-ICX-NO-BYPASS-DELAY: # %bb.0:
18 ; CHECK-ICX-NO-BYPASS-DELAY-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
19 ; CHECK-ICX-NO-BYPASS-DELAY-NEXT: retq
21 ; CHECK-ICX-BYPASS-DELAY-LABEL: transform_VUNPCKLPSYrr:
22 ; CHECK-ICX-BYPASS-DELAY: # %bb.0:
23 ; CHECK-ICX-BYPASS-DELAY-NEXT: vunpcklps {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
24 ; CHECK-ICX-BYPASS-DELAY-NEXT: retq
26 ; CHECK-SNB-LABEL: transform_VUNPCKLPSYrr:
28 ; CHECK-SNB-NEXT: vunpcklps {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
29 ; CHECK-SNB-NEXT: retq
30 %shufp = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 4, i32 12, i32 5, i32 13>
31 ret <8 x float> %shufp
34 define <8 x float> @transform_VUNPCKHPSYrr(<8 x float> %a, <8 x float> %b) nounwind {
35 ; CHECK-AVX2-LABEL: transform_VUNPCKHPSYrr:
36 ; CHECK-AVX2: # %bb.0:
37 ; CHECK-AVX2-NEXT: vunpckhps {{.*#+}} ymm0 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
38 ; CHECK-AVX2-NEXT: retq
40 ; CHECK-ICX-NO-BYPASS-DELAY-LABEL: transform_VUNPCKHPSYrr:
41 ; CHECK-ICX-NO-BYPASS-DELAY: # %bb.0:
42 ; CHECK-ICX-NO-BYPASS-DELAY-NEXT: vpunpckhdq {{.*#+}} ymm0 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
43 ; CHECK-ICX-NO-BYPASS-DELAY-NEXT: retq
45 ; CHECK-ICX-BYPASS-DELAY-LABEL: transform_VUNPCKHPSYrr:
46 ; CHECK-ICX-BYPASS-DELAY: # %bb.0:
47 ; CHECK-ICX-BYPASS-DELAY-NEXT: vunpckhps {{.*#+}} ymm0 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
48 ; CHECK-ICX-BYPASS-DELAY-NEXT: retq
50 ; CHECK-SNB-LABEL: transform_VUNPCKHPSYrr:
52 ; CHECK-SNB-NEXT: vunpckhps {{.*#+}} ymm0 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
53 ; CHECK-SNB-NEXT: retq
54 %shufp = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 2, i32 10, i32 3, i32 11, i32 6, i32 14, i32 7, i32 15>
55 ret <8 x float> %shufp
58 define <4 x float> @transform_VUNPCKLPSrr(<4 x float> %a, <4 x float> %b) nounwind {
59 ; CHECK-AVX2-LABEL: transform_VUNPCKLPSrr:
60 ; CHECK-AVX2: # %bb.0:
61 ; CHECK-AVX2-NEXT: vunpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
62 ; CHECK-AVX2-NEXT: retq
64 ; CHECK-ICX-NO-BYPASS-DELAY-LABEL: transform_VUNPCKLPSrr:
65 ; CHECK-ICX-NO-BYPASS-DELAY: # %bb.0:
66 ; CHECK-ICX-NO-BYPASS-DELAY-NEXT: vpunpckldq {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
67 ; CHECK-ICX-NO-BYPASS-DELAY-NEXT: retq
69 ; CHECK-ICX-BYPASS-DELAY-LABEL: transform_VUNPCKLPSrr:
70 ; CHECK-ICX-BYPASS-DELAY: # %bb.0:
71 ; CHECK-ICX-BYPASS-DELAY-NEXT: vunpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
72 ; CHECK-ICX-BYPASS-DELAY-NEXT: retq
74 ; CHECK-SNB-NO-BYPASS-DELAY-LABEL: transform_VUNPCKLPSrr:
75 ; CHECK-SNB-NO-BYPASS-DELAY: # %bb.0:
76 ; CHECK-SNB-NO-BYPASS-DELAY-NEXT: vpunpckldq {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
77 ; CHECK-SNB-NO-BYPASS-DELAY-NEXT: retq
79 ; CHECK-SNB-BYPASS-DELAY-LABEL: transform_VUNPCKLPSrr:
80 ; CHECK-SNB-BYPASS-DELAY: # %bb.0:
81 ; CHECK-SNB-BYPASS-DELAY-NEXT: vunpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
82 ; CHECK-SNB-BYPASS-DELAY-NEXT: retq
83 %shufp = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
84 ret <4 x float> %shufp
87 define <4 x float> @transform_VUNPCKHPSrr(<4 x float> %a, <4 x float> %b) nounwind {
88 ; CHECK-AVX2-LABEL: transform_VUNPCKHPSrr:
89 ; CHECK-AVX2: # %bb.0:
90 ; CHECK-AVX2-NEXT: vunpckhps {{.*#+}} xmm0 = xmm0[2],xmm1[2],xmm0[3],xmm1[3]
91 ; CHECK-AVX2-NEXT: retq
93 ; CHECK-ICX-NO-BYPASS-DELAY-LABEL: transform_VUNPCKHPSrr:
94 ; CHECK-ICX-NO-BYPASS-DELAY: # %bb.0:
95 ; CHECK-ICX-NO-BYPASS-DELAY-NEXT: vpunpckhdq {{.*#+}} xmm0 = xmm0[2],xmm1[2],xmm0[3],xmm1[3]
96 ; CHECK-ICX-NO-BYPASS-DELAY-NEXT: retq
98 ; CHECK-ICX-BYPASS-DELAY-LABEL: transform_VUNPCKHPSrr:
99 ; CHECK-ICX-BYPASS-DELAY: # %bb.0:
100 ; CHECK-ICX-BYPASS-DELAY-NEXT: vunpckhps {{.*#+}} xmm0 = xmm0[2],xmm1[2],xmm0[3],xmm1[3]
101 ; CHECK-ICX-BYPASS-DELAY-NEXT: retq
103 ; CHECK-SNB-NO-BYPASS-DELAY-LABEL: transform_VUNPCKHPSrr:
104 ; CHECK-SNB-NO-BYPASS-DELAY: # %bb.0:
105 ; CHECK-SNB-NO-BYPASS-DELAY-NEXT: vpunpckhdq {{.*#+}} xmm0 = xmm0[2],xmm1[2],xmm0[3],xmm1[3]
106 ; CHECK-SNB-NO-BYPASS-DELAY-NEXT: retq
108 ; CHECK-SNB-BYPASS-DELAY-LABEL: transform_VUNPCKHPSrr:
109 ; CHECK-SNB-BYPASS-DELAY: # %bb.0:
110 ; CHECK-SNB-BYPASS-DELAY-NEXT: vunpckhps {{.*#+}} xmm0 = xmm0[2],xmm1[2],xmm0[3],xmm1[3]
111 ; CHECK-SNB-BYPASS-DELAY-NEXT: retq
112 %shufp = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
113 ret <4 x float> %shufp
116 define <8 x float> @transform_VUNPCKLPSYrm(<8 x float> %a, ptr %pb) nounwind {
117 ; CHECK-AVX2-LABEL: transform_VUNPCKLPSYrm:
118 ; CHECK-AVX2: # %bb.0:
119 ; CHECK-AVX2-NEXT: vunpcklps {{.*#+}} ymm0 = ymm0[0],mem[0],ymm0[1],mem[1],ymm0[4],mem[4],ymm0[5],mem[5]
120 ; CHECK-AVX2-NEXT: retq
122 ; CHECK-ICX-NO-BYPASS-DELAY-LABEL: transform_VUNPCKLPSYrm:
123 ; CHECK-ICX-NO-BYPASS-DELAY: # %bb.0:
124 ; CHECK-ICX-NO-BYPASS-DELAY-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],mem[0],ymm0[1],mem[1],ymm0[4],mem[4],ymm0[5],mem[5]
125 ; CHECK-ICX-NO-BYPASS-DELAY-NEXT: retq
127 ; CHECK-ICX-BYPASS-DELAY-LABEL: transform_VUNPCKLPSYrm:
128 ; CHECK-ICX-BYPASS-DELAY: # %bb.0:
129 ; CHECK-ICX-BYPASS-DELAY-NEXT: vunpcklps {{.*#+}} ymm0 = ymm0[0],mem[0],ymm0[1],mem[1],ymm0[4],mem[4],ymm0[5],mem[5]
130 ; CHECK-ICX-BYPASS-DELAY-NEXT: retq
132 ; CHECK-SNB-LABEL: transform_VUNPCKLPSYrm:
133 ; CHECK-SNB: # %bb.0:
134 ; CHECK-SNB-NEXT: vunpcklps {{.*#+}} ymm0 = ymm0[0],mem[0],ymm0[1],mem[1],ymm0[4],mem[4],ymm0[5],mem[5]
135 ; CHECK-SNB-NEXT: retq
136 %b = load <8 x float>, ptr %pb
137 %shufp = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 4, i32 12, i32 5, i32 13>
138 ret <8 x float> %shufp
141 define <8 x float> @transform_VUNPCKHPSYrm(<8 x float> %a, ptr %pb) nounwind {
142 ; CHECK-AVX2-LABEL: transform_VUNPCKHPSYrm:
143 ; CHECK-AVX2: # %bb.0:
144 ; CHECK-AVX2-NEXT: vunpckhps {{.*#+}} ymm0 = ymm0[2],mem[2],ymm0[3],mem[3],ymm0[6],mem[6],ymm0[7],mem[7]
145 ; CHECK-AVX2-NEXT: retq
147 ; CHECK-ICX-NO-BYPASS-DELAY-LABEL: transform_VUNPCKHPSYrm:
148 ; CHECK-ICX-NO-BYPASS-DELAY: # %bb.0:
149 ; CHECK-ICX-NO-BYPASS-DELAY-NEXT: vpunpckhdq {{.*#+}} ymm0 = ymm0[2],mem[2],ymm0[3],mem[3],ymm0[6],mem[6],ymm0[7],mem[7]
150 ; CHECK-ICX-NO-BYPASS-DELAY-NEXT: retq
152 ; CHECK-ICX-BYPASS-DELAY-LABEL: transform_VUNPCKHPSYrm:
153 ; CHECK-ICX-BYPASS-DELAY: # %bb.0:
154 ; CHECK-ICX-BYPASS-DELAY-NEXT: vunpckhps {{.*#+}} ymm0 = ymm0[2],mem[2],ymm0[3],mem[3],ymm0[6],mem[6],ymm0[7],mem[7]
155 ; CHECK-ICX-BYPASS-DELAY-NEXT: retq
157 ; CHECK-SNB-LABEL: transform_VUNPCKHPSYrm:
158 ; CHECK-SNB: # %bb.0:
159 ; CHECK-SNB-NEXT: vunpckhps {{.*#+}} ymm0 = ymm0[2],mem[2],ymm0[3],mem[3],ymm0[6],mem[6],ymm0[7],mem[7]
160 ; CHECK-SNB-NEXT: retq
161 %b = load <8 x float>, ptr %pb
162 %shufp = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 2, i32 10, i32 3, i32 11, i32 6, i32 14, i32 7, i32 15>
163 ret <8 x float> %shufp
166 define <4 x float> @transform_VUNPCKLPSrm(<4 x float> %a, ptr %pb) nounwind {
167 ; CHECK-AVX2-LABEL: transform_VUNPCKLPSrm:
168 ; CHECK-AVX2: # %bb.0:
169 ; CHECK-AVX2-NEXT: vunpcklps {{.*#+}} xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
170 ; CHECK-AVX2-NEXT: retq
172 ; CHECK-ICX-NO-BYPASS-DELAY-LABEL: transform_VUNPCKLPSrm:
173 ; CHECK-ICX-NO-BYPASS-DELAY: # %bb.0:
174 ; CHECK-ICX-NO-BYPASS-DELAY-NEXT: vpunpckldq {{.*#+}} xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
175 ; CHECK-ICX-NO-BYPASS-DELAY-NEXT: retq
177 ; CHECK-ICX-BYPASS-DELAY-LABEL: transform_VUNPCKLPSrm:
178 ; CHECK-ICX-BYPASS-DELAY: # %bb.0:
179 ; CHECK-ICX-BYPASS-DELAY-NEXT: vunpcklps {{.*#+}} xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
180 ; CHECK-ICX-BYPASS-DELAY-NEXT: retq
182 ; CHECK-SNB-NO-BYPASS-DELAY-LABEL: transform_VUNPCKLPSrm:
183 ; CHECK-SNB-NO-BYPASS-DELAY: # %bb.0:
184 ; CHECK-SNB-NO-BYPASS-DELAY-NEXT: vpunpckldq {{.*#+}} xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
185 ; CHECK-SNB-NO-BYPASS-DELAY-NEXT: retq
187 ; CHECK-SNB-BYPASS-DELAY-LABEL: transform_VUNPCKLPSrm:
188 ; CHECK-SNB-BYPASS-DELAY: # %bb.0:
189 ; CHECK-SNB-BYPASS-DELAY-NEXT: vunpcklps {{.*#+}} xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
190 ; CHECK-SNB-BYPASS-DELAY-NEXT: retq
191 %b = load <4 x float>, ptr %pb
192 %shufp = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
193 ret <4 x float> %shufp
196 define <4 x float> @transform_VUNPCKHPSrm(<4 x float> %a, ptr %pb) nounwind {
197 ; CHECK-AVX2-LABEL: transform_VUNPCKHPSrm:
198 ; CHECK-AVX2: # %bb.0:
199 ; CHECK-AVX2-NEXT: vunpckhps {{.*#+}} xmm0 = xmm0[2],mem[2],xmm0[3],mem[3]
200 ; CHECK-AVX2-NEXT: retq
202 ; CHECK-ICX-NO-BYPASS-DELAY-LABEL: transform_VUNPCKHPSrm:
203 ; CHECK-ICX-NO-BYPASS-DELAY: # %bb.0:
204 ; CHECK-ICX-NO-BYPASS-DELAY-NEXT: vpunpckhdq {{.*#+}} xmm0 = xmm0[2],mem[2],xmm0[3],mem[3]
205 ; CHECK-ICX-NO-BYPASS-DELAY-NEXT: retq
207 ; CHECK-ICX-BYPASS-DELAY-LABEL: transform_VUNPCKHPSrm:
208 ; CHECK-ICX-BYPASS-DELAY: # %bb.0:
209 ; CHECK-ICX-BYPASS-DELAY-NEXT: vunpckhps {{.*#+}} xmm0 = xmm0[2],mem[2],xmm0[3],mem[3]
210 ; CHECK-ICX-BYPASS-DELAY-NEXT: retq
212 ; CHECK-SNB-NO-BYPASS-DELAY-LABEL: transform_VUNPCKHPSrm:
213 ; CHECK-SNB-NO-BYPASS-DELAY: # %bb.0:
214 ; CHECK-SNB-NO-BYPASS-DELAY-NEXT: vpunpckhdq {{.*#+}} xmm0 = xmm0[2],mem[2],xmm0[3],mem[3]
215 ; CHECK-SNB-NO-BYPASS-DELAY-NEXT: retq
217 ; CHECK-SNB-BYPASS-DELAY-LABEL: transform_VUNPCKHPSrm:
218 ; CHECK-SNB-BYPASS-DELAY: # %bb.0:
219 ; CHECK-SNB-BYPASS-DELAY-NEXT: vunpckhps {{.*#+}} xmm0 = xmm0[2],mem[2],xmm0[3],mem[3]
220 ; CHECK-SNB-BYPASS-DELAY-NEXT: retq
221 %b = load <4 x float>, ptr %pb
222 %shufp = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
223 ret <4 x float> %shufp
225 ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: