• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+sse2 -O3 | FileCheck %s --check-prefix=SSE-32
3; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse2 -O3 | FileCheck %s --check-prefix=SSE-64
4; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+avx -O3 | FileCheck %s --check-prefix=AVX-32
5; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx -O3 | FileCheck %s --check-prefix=AVX-64
6; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+avx512f -mattr=+avx512vl -O3 | FileCheck %s --check-prefix=AVX512-32
7; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f -mattr=+avx512vl -O3 | FileCheck %s --check-prefix=AVX512-64
8; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+avx512f -mattr=+avx512f -O3 | FileCheck %s --check-prefix=AVX512F-32
9; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f -mattr=+avx512f -O3 | FileCheck %s --check-prefix=AVX512F-64
10
11define <2 x i32> @test_v2f32_ogt_s(<2 x i32> %a, <2 x i32> %b, <2 x float> %f1, <2 x float> %f2) #0 {
12; SSE-32-LABEL: test_v2f32_ogt_s:
13; SSE-32:       # %bb.0:
14; SSE-32-NEXT:    pushl %ebp
15; SSE-32-NEXT:    movl %esp, %ebp
16; SSE-32-NEXT:    andl $-16, %esp
17; SSE-32-NEXT:    subl $16, %esp
18; SSE-32-NEXT:    movaps 8(%ebp), %xmm3
19; SSE-32-NEXT:    xorl %eax, %eax
20; SSE-32-NEXT:    comiss %xmm3, %xmm2
21; SSE-32-NEXT:    movl $-1, %ecx
22; SSE-32-NEXT:    movl $0, %edx
23; SSE-32-NEXT:    cmoval %ecx, %edx
24; SSE-32-NEXT:    movd %edx, %xmm4
25; SSE-32-NEXT:    shufps {{.*#+}} xmm3 = xmm3[1,1,1,1]
26; SSE-32-NEXT:    shufps {{.*#+}} xmm2 = xmm2[1,1,1,1]
27; SSE-32-NEXT:    comiss %xmm3, %xmm2
28; SSE-32-NEXT:    cmoval %ecx, %eax
29; SSE-32-NEXT:    movd %eax, %xmm2
30; SSE-32-NEXT:    punpckldq {{.*#+}} xmm4 = xmm4[0],xmm2[0],xmm4[1],xmm2[1]
31; SSE-32-NEXT:    pand %xmm4, %xmm0
32; SSE-32-NEXT:    pandn %xmm1, %xmm4
33; SSE-32-NEXT:    por %xmm4, %xmm0
34; SSE-32-NEXT:    movl %ebp, %esp
35; SSE-32-NEXT:    popl %ebp
36; SSE-32-NEXT:    retl
37;
38; SSE-64-LABEL: test_v2f32_ogt_s:
39; SSE-64:       # %bb.0:
40; SSE-64-NEXT:    xorl %eax, %eax
41; SSE-64-NEXT:    comiss %xmm3, %xmm2
42; SSE-64-NEXT:    movl $-1, %ecx
43; SSE-64-NEXT:    movl $0, %edx
44; SSE-64-NEXT:    cmoval %ecx, %edx
45; SSE-64-NEXT:    movd %edx, %xmm4
46; SSE-64-NEXT:    shufps {{.*#+}} xmm3 = xmm3[1,1,1,1]
47; SSE-64-NEXT:    shufps {{.*#+}} xmm2 = xmm2[1,1,1,1]
48; SSE-64-NEXT:    comiss %xmm3, %xmm2
49; SSE-64-NEXT:    cmoval %ecx, %eax
50; SSE-64-NEXT:    movd %eax, %xmm2
51; SSE-64-NEXT:    punpckldq {{.*#+}} xmm4 = xmm4[0],xmm2[0],xmm4[1],xmm2[1]
52; SSE-64-NEXT:    pand %xmm4, %xmm0
53; SSE-64-NEXT:    pandn %xmm1, %xmm4
54; SSE-64-NEXT:    por %xmm4, %xmm0
55; SSE-64-NEXT:    retq
56;
57; AVX-32-LABEL: test_v2f32_ogt_s:
58; AVX-32:       # %bb.0:
59; AVX-32-NEXT:    pushl %ebp
60; AVX-32-NEXT:    movl %esp, %ebp
61; AVX-32-NEXT:    andl $-16, %esp
62; AVX-32-NEXT:    subl $16, %esp
63; AVX-32-NEXT:    vmovshdup {{.*#+}} xmm3 = xmm2[1,1,3,3]
64; AVX-32-NEXT:    xorl %eax, %eax
65; AVX-32-NEXT:    vcomiss 12(%ebp), %xmm3
66; AVX-32-NEXT:    movl $-1, %ecx
67; AVX-32-NEXT:    movl $0, %edx
68; AVX-32-NEXT:    cmoval %ecx, %edx
69; AVX-32-NEXT:    vcomiss 8(%ebp), %xmm2
70; AVX-32-NEXT:    cmoval %ecx, %eax
71; AVX-32-NEXT:    vmovd %eax, %xmm2
72; AVX-32-NEXT:    vpinsrd $1, %edx, %xmm2, %xmm2
73; AVX-32-NEXT:    vblendvps %xmm2, %xmm0, %xmm1, %xmm0
74; AVX-32-NEXT:    movl %ebp, %esp
75; AVX-32-NEXT:    popl %ebp
76; AVX-32-NEXT:    retl
77;
78; AVX-64-LABEL: test_v2f32_ogt_s:
79; AVX-64:       # %bb.0:
80; AVX-64-NEXT:    vmovshdup {{.*#+}} xmm4 = xmm3[1,1,3,3]
81; AVX-64-NEXT:    vmovshdup {{.*#+}} xmm5 = xmm2[1,1,3,3]
82; AVX-64-NEXT:    xorl %eax, %eax
83; AVX-64-NEXT:    vcomiss %xmm4, %xmm5
84; AVX-64-NEXT:    movl $-1, %ecx
85; AVX-64-NEXT:    movl $0, %edx
86; AVX-64-NEXT:    cmoval %ecx, %edx
87; AVX-64-NEXT:    vcomiss %xmm3, %xmm2
88; AVX-64-NEXT:    cmoval %ecx, %eax
89; AVX-64-NEXT:    vmovd %eax, %xmm2
90; AVX-64-NEXT:    vpinsrd $1, %edx, %xmm2, %xmm2
91; AVX-64-NEXT:    vblendvps %xmm2, %xmm0, %xmm1, %xmm0
92; AVX-64-NEXT:    retq
93;
94; AVX512-32-LABEL: test_v2f32_ogt_s:
95; AVX512-32:       # %bb.0:
96; AVX512-32-NEXT:    pushl %ebp
97; AVX512-32-NEXT:    movl %esp, %ebp
98; AVX512-32-NEXT:    andl $-16, %esp
99; AVX512-32-NEXT:    subl $16, %esp
100; AVX512-32-NEXT:    movw $-3, %ax
101; AVX512-32-NEXT:    kmovw %eax, %k0
102; AVX512-32-NEXT:    vcomiss 8(%ebp), %xmm2
103; AVX512-32-NEXT:    seta %al
104; AVX512-32-NEXT:    kmovw %eax, %k1
105; AVX512-32-NEXT:    kandw %k0, %k1, %k0
106; AVX512-32-NEXT:    vmovshdup {{.*#+}} xmm2 = xmm2[1,1,3,3]
107; AVX512-32-NEXT:    vcomiss 12(%ebp), %xmm2
108; AVX512-32-NEXT:    seta %al
109; AVX512-32-NEXT:    kmovw %eax, %k1
110; AVX512-32-NEXT:    kshiftlw $15, %k1, %k1
111; AVX512-32-NEXT:    kshiftrw $14, %k1, %k1
112; AVX512-32-NEXT:    korw %k1, %k0, %k1
113; AVX512-32-NEXT:    vpblendmd %xmm0, %xmm1, %xmm0 {%k1}
114; AVX512-32-NEXT:    movl %ebp, %esp
115; AVX512-32-NEXT:    popl %ebp
116; AVX512-32-NEXT:    retl
117;
118; AVX512-64-LABEL: test_v2f32_ogt_s:
119; AVX512-64:       # %bb.0:
120; AVX512-64-NEXT:    movw $-3, %ax
121; AVX512-64-NEXT:    kmovw %eax, %k0
122; AVX512-64-NEXT:    vcomiss %xmm3, %xmm2
123; AVX512-64-NEXT:    seta %al
124; AVX512-64-NEXT:    kmovw %eax, %k1
125; AVX512-64-NEXT:    kandw %k0, %k1, %k0
126; AVX512-64-NEXT:    vmovshdup {{.*#+}} xmm3 = xmm3[1,1,3,3]
127; AVX512-64-NEXT:    vmovshdup {{.*#+}} xmm2 = xmm2[1,1,3,3]
128; AVX512-64-NEXT:    vcomiss %xmm3, %xmm2
129; AVX512-64-NEXT:    seta %al
130; AVX512-64-NEXT:    kmovw %eax, %k1
131; AVX512-64-NEXT:    kshiftlw $15, %k1, %k1
132; AVX512-64-NEXT:    kshiftrw $14, %k1, %k1
133; AVX512-64-NEXT:    korw %k1, %k0, %k1
134; AVX512-64-NEXT:    vpblendmd %xmm0, %xmm1, %xmm0 {%k1}
135; AVX512-64-NEXT:    retq
136;
137; AVX512F-32-LABEL: test_v2f32_ogt_s:
138; AVX512F-32:       # %bb.0:
139; AVX512F-32-NEXT:    pushl %ebp
140; AVX512F-32-NEXT:    movl %esp, %ebp
141; AVX512F-32-NEXT:    andl $-16, %esp
142; AVX512F-32-NEXT:    subl $16, %esp
143; AVX512F-32-NEXT:    # kill: def $xmm1 killed $xmm1 def $zmm1
144; AVX512F-32-NEXT:    # kill: def $xmm0 killed $xmm0 def $zmm0
145; AVX512F-32-NEXT:    movw $-3, %ax
146; AVX512F-32-NEXT:    kmovw %eax, %k0
147; AVX512F-32-NEXT:    vcomiss 8(%ebp), %xmm2
148; AVX512F-32-NEXT:    seta %al
149; AVX512F-32-NEXT:    kmovw %eax, %k1
150; AVX512F-32-NEXT:    kandw %k0, %k1, %k0
151; AVX512F-32-NEXT:    vmovshdup {{.*#+}} xmm2 = xmm2[1,1,3,3]
152; AVX512F-32-NEXT:    vcomiss 12(%ebp), %xmm2
153; AVX512F-32-NEXT:    seta %al
154; AVX512F-32-NEXT:    kmovw %eax, %k1
155; AVX512F-32-NEXT:    kshiftlw $15, %k1, %k1
156; AVX512F-32-NEXT:    kshiftrw $14, %k1, %k1
157; AVX512F-32-NEXT:    korw %k1, %k0, %k1
158; AVX512F-32-NEXT:    vpblendmd %zmm0, %zmm1, %zmm0 {%k1}
159; AVX512F-32-NEXT:    # kill: def $xmm0 killed $xmm0 killed $zmm0
160; AVX512F-32-NEXT:    movl %ebp, %esp
161; AVX512F-32-NEXT:    popl %ebp
162; AVX512F-32-NEXT:    vzeroupper
163; AVX512F-32-NEXT:    retl
164;
165; AVX512F-64-LABEL: test_v2f32_ogt_s:
166; AVX512F-64:       # %bb.0:
167; AVX512F-64-NEXT:    # kill: def $xmm1 killed $xmm1 def $zmm1
168; AVX512F-64-NEXT:    # kill: def $xmm0 killed $xmm0 def $zmm0
169; AVX512F-64-NEXT:    movw $-3, %ax
170; AVX512F-64-NEXT:    kmovw %eax, %k0
171; AVX512F-64-NEXT:    vcomiss %xmm3, %xmm2
172; AVX512F-64-NEXT:    seta %al
173; AVX512F-64-NEXT:    kmovw %eax, %k1
174; AVX512F-64-NEXT:    kandw %k0, %k1, %k0
175; AVX512F-64-NEXT:    vmovshdup {{.*#+}} xmm3 = xmm3[1,1,3,3]
176; AVX512F-64-NEXT:    vmovshdup {{.*#+}} xmm2 = xmm2[1,1,3,3]
177; AVX512F-64-NEXT:    vcomiss %xmm3, %xmm2
178; AVX512F-64-NEXT:    seta %al
179; AVX512F-64-NEXT:    kmovw %eax, %k1
180; AVX512F-64-NEXT:    kshiftlw $15, %k1, %k1
181; AVX512F-64-NEXT:    kshiftrw $14, %k1, %k1
182; AVX512F-64-NEXT:    korw %k1, %k0, %k1
183; AVX512F-64-NEXT:    vpblendmd %zmm0, %zmm1, %zmm0 {%k1}
184; AVX512F-64-NEXT:    # kill: def $xmm0 killed $xmm0 killed $zmm0
185; AVX512F-64-NEXT:    vzeroupper
186; AVX512F-64-NEXT:    retq
187  %cond = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(
188                                               <2 x float> %f1, <2 x float> %f2, metadata !"ogt",
189                                               metadata !"fpexcept.strict") #0
190  %res = select <2 x i1> %cond, <2 x i32> %a, <2 x i32> %b
191  ret <2 x i32> %res
192}
193
194define <2 x i32> @test_v2f32_oeq_q(<2 x i32> %a, <2 x i32> %b, <2 x float> %f1, <2 x float> %f2) #0 {
195; SSE-32-LABEL: test_v2f32_oeq_q:
196; SSE-32:       # %bb.0:
197; SSE-32-NEXT:    pushl %ebp
198; SSE-32-NEXT:    movl %esp, %ebp
199; SSE-32-NEXT:    andl $-16, %esp
200; SSE-32-NEXT:    subl $16, %esp
201; SSE-32-NEXT:    movaps 8(%ebp), %xmm3
202; SSE-32-NEXT:    xorl %eax, %eax
203; SSE-32-NEXT:    ucomiss %xmm3, %xmm2
204; SSE-32-NEXT:    movl $-1, %ecx
205; SSE-32-NEXT:    movl $-1, %edx
206; SSE-32-NEXT:    cmovnel %eax, %edx
207; SSE-32-NEXT:    cmovpl %eax, %edx
208; SSE-32-NEXT:    movd %edx, %xmm4
209; SSE-32-NEXT:    shufps {{.*#+}} xmm3 = xmm3[1,1,1,1]
210; SSE-32-NEXT:    shufps {{.*#+}} xmm2 = xmm2[1,1,1,1]
211; SSE-32-NEXT:    ucomiss %xmm3, %xmm2
212; SSE-32-NEXT:    cmovnel %eax, %ecx
213; SSE-32-NEXT:    cmovpl %eax, %ecx
214; SSE-32-NEXT:    movd %ecx, %xmm2
215; SSE-32-NEXT:    punpckldq {{.*#+}} xmm4 = xmm4[0],xmm2[0],xmm4[1],xmm2[1]
216; SSE-32-NEXT:    pand %xmm4, %xmm0
217; SSE-32-NEXT:    pandn %xmm1, %xmm4
218; SSE-32-NEXT:    por %xmm4, %xmm0
219; SSE-32-NEXT:    movl %ebp, %esp
220; SSE-32-NEXT:    popl %ebp
221; SSE-32-NEXT:    retl
222;
223; SSE-64-LABEL: test_v2f32_oeq_q:
224; SSE-64:       # %bb.0:
225; SSE-64-NEXT:    xorl %eax, %eax
226; SSE-64-NEXT:    ucomiss %xmm3, %xmm2
227; SSE-64-NEXT:    movl $-1, %ecx
228; SSE-64-NEXT:    movl $-1, %edx
229; SSE-64-NEXT:    cmovnel %eax, %edx
230; SSE-64-NEXT:    cmovpl %eax, %edx
231; SSE-64-NEXT:    movd %edx, %xmm4
232; SSE-64-NEXT:    shufps {{.*#+}} xmm3 = xmm3[1,1,1,1]
233; SSE-64-NEXT:    shufps {{.*#+}} xmm2 = xmm2[1,1,1,1]
234; SSE-64-NEXT:    ucomiss %xmm3, %xmm2
235; SSE-64-NEXT:    cmovnel %eax, %ecx
236; SSE-64-NEXT:    cmovpl %eax, %ecx
237; SSE-64-NEXT:    movd %ecx, %xmm2
238; SSE-64-NEXT:    punpckldq {{.*#+}} xmm4 = xmm4[0],xmm2[0],xmm4[1],xmm2[1]
239; SSE-64-NEXT:    pand %xmm4, %xmm0
240; SSE-64-NEXT:    pandn %xmm1, %xmm4
241; SSE-64-NEXT:    por %xmm4, %xmm0
242; SSE-64-NEXT:    retq
243;
244; AVX-32-LABEL: test_v2f32_oeq_q:
245; AVX-32:       # %bb.0:
246; AVX-32-NEXT:    pushl %ebp
247; AVX-32-NEXT:    movl %esp, %ebp
248; AVX-32-NEXT:    andl $-16, %esp
249; AVX-32-NEXT:    subl $16, %esp
250; AVX-32-NEXT:    vmovshdup {{.*#+}} xmm3 = xmm2[1,1,3,3]
251; AVX-32-NEXT:    xorl %eax, %eax
252; AVX-32-NEXT:    vucomiss 12(%ebp), %xmm3
253; AVX-32-NEXT:    movl $-1, %ecx
254; AVX-32-NEXT:    movl $-1, %edx
255; AVX-32-NEXT:    cmovnel %eax, %edx
256; AVX-32-NEXT:    cmovpl %eax, %edx
257; AVX-32-NEXT:    vucomiss 8(%ebp), %xmm2
258; AVX-32-NEXT:    cmovnel %eax, %ecx
259; AVX-32-NEXT:    cmovpl %eax, %ecx
260; AVX-32-NEXT:    vmovd %ecx, %xmm2
261; AVX-32-NEXT:    vpinsrd $1, %edx, %xmm2, %xmm2
262; AVX-32-NEXT:    vblendvps %xmm2, %xmm0, %xmm1, %xmm0
263; AVX-32-NEXT:    movl %ebp, %esp
264; AVX-32-NEXT:    popl %ebp
265; AVX-32-NEXT:    retl
266;
267; AVX-64-LABEL: test_v2f32_oeq_q:
268; AVX-64:       # %bb.0:
269; AVX-64-NEXT:    vmovshdup {{.*#+}} xmm4 = xmm3[1,1,3,3]
270; AVX-64-NEXT:    vmovshdup {{.*#+}} xmm5 = xmm2[1,1,3,3]
271; AVX-64-NEXT:    xorl %eax, %eax
272; AVX-64-NEXT:    vucomiss %xmm4, %xmm5
273; AVX-64-NEXT:    movl $-1, %ecx
274; AVX-64-NEXT:    movl $-1, %edx
275; AVX-64-NEXT:    cmovnel %eax, %edx
276; AVX-64-NEXT:    cmovpl %eax, %edx
277; AVX-64-NEXT:    vucomiss %xmm3, %xmm2
278; AVX-64-NEXT:    cmovnel %eax, %ecx
279; AVX-64-NEXT:    cmovpl %eax, %ecx
280; AVX-64-NEXT:    vmovd %ecx, %xmm2
281; AVX-64-NEXT:    vpinsrd $1, %edx, %xmm2, %xmm2
282; AVX-64-NEXT:    vblendvps %xmm2, %xmm0, %xmm1, %xmm0
283; AVX-64-NEXT:    retq
284;
285; AVX512-32-LABEL: test_v2f32_oeq_q:
286; AVX512-32:       # %bb.0:
287; AVX512-32-NEXT:    pushl %ebp
288; AVX512-32-NEXT:    movl %esp, %ebp
289; AVX512-32-NEXT:    andl $-16, %esp
290; AVX512-32-NEXT:    subl $16, %esp
291; AVX512-32-NEXT:    movw $-3, %ax
292; AVX512-32-NEXT:    kmovw %eax, %k0
293; AVX512-32-NEXT:    vucomiss 8(%ebp), %xmm2
294; AVX512-32-NEXT:    setnp %al
295; AVX512-32-NEXT:    sete %cl
296; AVX512-32-NEXT:    testb %al, %cl
297; AVX512-32-NEXT:    setne %al
298; AVX512-32-NEXT:    kmovw %eax, %k1
299; AVX512-32-NEXT:    kandw %k0, %k1, %k0
300; AVX512-32-NEXT:    vmovshdup {{.*#+}} xmm2 = xmm2[1,1,3,3]
301; AVX512-32-NEXT:    vucomiss 12(%ebp), %xmm2
302; AVX512-32-NEXT:    setnp %al
303; AVX512-32-NEXT:    sete %cl
304; AVX512-32-NEXT:    testb %al, %cl
305; AVX512-32-NEXT:    setne %al
306; AVX512-32-NEXT:    kmovw %eax, %k1
307; AVX512-32-NEXT:    kshiftlw $15, %k1, %k1
308; AVX512-32-NEXT:    kshiftrw $14, %k1, %k1
309; AVX512-32-NEXT:    korw %k1, %k0, %k1
310; AVX512-32-NEXT:    vpblendmd %xmm0, %xmm1, %xmm0 {%k1}
311; AVX512-32-NEXT:    movl %ebp, %esp
312; AVX512-32-NEXT:    popl %ebp
313; AVX512-32-NEXT:    retl
314;
315; AVX512-64-LABEL: test_v2f32_oeq_q:
316; AVX512-64:       # %bb.0:
317; AVX512-64-NEXT:    vucomiss %xmm3, %xmm2
318; AVX512-64-NEXT:    setnp %al
319; AVX512-64-NEXT:    sete %cl
320; AVX512-64-NEXT:    testb %al, %cl
321; AVX512-64-NEXT:    setne %al
322; AVX512-64-NEXT:    kmovw %eax, %k0
323; AVX512-64-NEXT:    movw $-3, %ax
324; AVX512-64-NEXT:    kmovw %eax, %k1
325; AVX512-64-NEXT:    kandw %k1, %k0, %k0
326; AVX512-64-NEXT:    vmovshdup {{.*#+}} xmm3 = xmm3[1,1,3,3]
327; AVX512-64-NEXT:    vmovshdup {{.*#+}} xmm2 = xmm2[1,1,3,3]
328; AVX512-64-NEXT:    vucomiss %xmm3, %xmm2
329; AVX512-64-NEXT:    setnp %al
330; AVX512-64-NEXT:    sete %cl
331; AVX512-64-NEXT:    testb %al, %cl
332; AVX512-64-NEXT:    setne %al
333; AVX512-64-NEXT:    kmovw %eax, %k1
334; AVX512-64-NEXT:    kshiftlw $15, %k1, %k1
335; AVX512-64-NEXT:    kshiftrw $14, %k1, %k1
336; AVX512-64-NEXT:    korw %k1, %k0, %k1
337; AVX512-64-NEXT:    vpblendmd %xmm0, %xmm1, %xmm0 {%k1}
338; AVX512-64-NEXT:    retq
339;
340; AVX512F-32-LABEL: test_v2f32_oeq_q:
341; AVX512F-32:       # %bb.0:
342; AVX512F-32-NEXT:    pushl %ebp
343; AVX512F-32-NEXT:    movl %esp, %ebp
344; AVX512F-32-NEXT:    andl $-16, %esp
345; AVX512F-32-NEXT:    subl $16, %esp
346; AVX512F-32-NEXT:    # kill: def $xmm1 killed $xmm1 def $zmm1
347; AVX512F-32-NEXT:    # kill: def $xmm0 killed $xmm0 def $zmm0
348; AVX512F-32-NEXT:    movw $-3, %ax
349; AVX512F-32-NEXT:    kmovw %eax, %k0
350; AVX512F-32-NEXT:    vucomiss 8(%ebp), %xmm2
351; AVX512F-32-NEXT:    setnp %al
352; AVX512F-32-NEXT:    sete %cl
353; AVX512F-32-NEXT:    testb %al, %cl
354; AVX512F-32-NEXT:    setne %al
355; AVX512F-32-NEXT:    kmovw %eax, %k1
356; AVX512F-32-NEXT:    kandw %k0, %k1, %k0
357; AVX512F-32-NEXT:    vmovshdup {{.*#+}} xmm2 = xmm2[1,1,3,3]
358; AVX512F-32-NEXT:    vucomiss 12(%ebp), %xmm2
359; AVX512F-32-NEXT:    setnp %al
360; AVX512F-32-NEXT:    sete %cl
361; AVX512F-32-NEXT:    testb %al, %cl
362; AVX512F-32-NEXT:    setne %al
363; AVX512F-32-NEXT:    kmovw %eax, %k1
364; AVX512F-32-NEXT:    kshiftlw $15, %k1, %k1
365; AVX512F-32-NEXT:    kshiftrw $14, %k1, %k1
366; AVX512F-32-NEXT:    korw %k1, %k0, %k1
367; AVX512F-32-NEXT:    vpblendmd %zmm0, %zmm1, %zmm0 {%k1}
368; AVX512F-32-NEXT:    # kill: def $xmm0 killed $xmm0 killed $zmm0
369; AVX512F-32-NEXT:    movl %ebp, %esp
370; AVX512F-32-NEXT:    popl %ebp
371; AVX512F-32-NEXT:    vzeroupper
372; AVX512F-32-NEXT:    retl
373;
374; AVX512F-64-LABEL: test_v2f32_oeq_q:
375; AVX512F-64:       # %bb.0:
376; AVX512F-64-NEXT:    # kill: def $xmm1 killed $xmm1 def $zmm1
377; AVX512F-64-NEXT:    # kill: def $xmm0 killed $xmm0 def $zmm0
378; AVX512F-64-NEXT:    vucomiss %xmm3, %xmm2
379; AVX512F-64-NEXT:    setnp %al
380; AVX512F-64-NEXT:    sete %cl
381; AVX512F-64-NEXT:    testb %al, %cl
382; AVX512F-64-NEXT:    setne %al
383; AVX512F-64-NEXT:    kmovw %eax, %k0
384; AVX512F-64-NEXT:    movw $-3, %ax
385; AVX512F-64-NEXT:    kmovw %eax, %k1
386; AVX512F-64-NEXT:    kandw %k1, %k0, %k0
387; AVX512F-64-NEXT:    vmovshdup {{.*#+}} xmm3 = xmm3[1,1,3,3]
388; AVX512F-64-NEXT:    vmovshdup {{.*#+}} xmm2 = xmm2[1,1,3,3]
389; AVX512F-64-NEXT:    vucomiss %xmm3, %xmm2
390; AVX512F-64-NEXT:    setnp %al
391; AVX512F-64-NEXT:    sete %cl
392; AVX512F-64-NEXT:    testb %al, %cl
393; AVX512F-64-NEXT:    setne %al
394; AVX512F-64-NEXT:    kmovw %eax, %k1
395; AVX512F-64-NEXT:    kshiftlw $15, %k1, %k1
396; AVX512F-64-NEXT:    kshiftrw $14, %k1, %k1
397; AVX512F-64-NEXT:    korw %k1, %k0, %k1
398; AVX512F-64-NEXT:    vpblendmd %zmm0, %zmm1, %zmm0 {%k1}
399; AVX512F-64-NEXT:    # kill: def $xmm0 killed $xmm0 killed $zmm0
400; AVX512F-64-NEXT:    vzeroupper
401; AVX512F-64-NEXT:    retq
402  %cond = call <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(
403                                               <2 x float> %f1, <2 x float> %f2, metadata !"oeq",
404                                               metadata !"fpexcept.strict") #0
405  %res = select <2 x i1> %cond, <2 x i32> %a, <2 x i32> %b
406  ret <2 x i32> %res
407}
408
409attributes #0 = { strictfp nounwind }
410
411declare <2 x i1> @llvm.experimental.constrained.fcmp.v2f32(<2 x float>, <2 x float>, metadata, metadata)
412declare <2 x i1> @llvm.experimental.constrained.fcmps.v2f32(<2 x float>, <2 x float>, metadata, metadata)
413