1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mattr=+avx512f | FileCheck %s --check-prefix=KNL
3 ; RUN: llc < %s -mattr=+avx512f,+avx512vl,+avx512bw,+avx512dq | FileCheck %s --check-prefix=SKX
5 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
6 target triple = "x86_64-unknown-linux-gnu"
8 define void @test(<4 x i1> %m, <4 x x86_fp80> %v, ptr%p) local_unnamed_addr {
11 ; KNL-NEXT: vpslld $31, %xmm0, %xmm0
12 ; KNL-NEXT: vptestmd %zmm0, %zmm0, %k0
13 ; KNL-NEXT: kshiftrw $2, %k0, %k1
14 ; KNL-NEXT: kmovw %k1, %eax
15 ; KNL-NEXT: testb $1, %al
18 ; KNL-NEXT: fld %st(0)
19 ; KNL-NEXT: fcmovne %st(2), %st
20 ; KNL-NEXT: testb $2, %al
21 ; KNL-NEXT: fld %st(1)
22 ; KNL-NEXT: fcmovne %st(3), %st
23 ; KNL-NEXT: kmovw %k0, %eax
24 ; KNL-NEXT: testb $1, %al
25 ; KNL-NEXT: fld %st(2)
26 ; KNL-NEXT: fcmovne %st(4), %st
27 ; KNL-NEXT: testb $2, %al
28 ; KNL-NEXT: fxch %st(3)
29 ; KNL-NEXT: fcmovne %st(4), %st
30 ; KNL-NEXT: fstp %st(4)
31 ; KNL-NEXT: fxch %st(3)
32 ; KNL-NEXT: fstpt 10(%rdi)
33 ; KNL-NEXT: fxch %st(1)
34 ; KNL-NEXT: fstpt (%rdi)
35 ; KNL-NEXT: fxch %st(1)
36 ; KNL-NEXT: fstpt 30(%rdi)
37 ; KNL-NEXT: fstpt 20(%rdi)
38 ; KNL-NEXT: vzeroupper
43 ; SKX-NEXT: vpslld $31, %xmm0, %xmm0
44 ; SKX-NEXT: vpmovd2m %xmm0, %k0
45 ; SKX-NEXT: kshiftrb $2, %k0, %k1
46 ; SKX-NEXT: kmovd %k1, %eax
47 ; SKX-NEXT: testb $1, %al
50 ; SKX-NEXT: fld %st(0)
51 ; SKX-NEXT: fcmovne %st(2), %st
52 ; SKX-NEXT: testb $2, %al
53 ; SKX-NEXT: fld %st(1)
54 ; SKX-NEXT: fcmovne %st(3), %st
55 ; SKX-NEXT: kmovd %k0, %eax
56 ; SKX-NEXT: testb $1, %al
57 ; SKX-NEXT: fld %st(2)
58 ; SKX-NEXT: fcmovne %st(4), %st
59 ; SKX-NEXT: testb $2, %al
60 ; SKX-NEXT: fxch %st(3)
61 ; SKX-NEXT: fcmovne %st(4), %st
62 ; SKX-NEXT: fstp %st(4)
63 ; SKX-NEXT: fxch %st(3)
64 ; SKX-NEXT: fstpt 10(%rdi)
65 ; SKX-NEXT: fxch %st(1)
66 ; SKX-NEXT: fstpt (%rdi)
67 ; SKX-NEXT: fxch %st(1)
68 ; SKX-NEXT: fstpt 30(%rdi)
69 ; SKX-NEXT: fstpt 20(%rdi)
72 %tmp = select <4 x i1> %m, <4 x x86_fp80> <x86_fp80 0xK3FFF8000000000000000, x86_fp80 0xK3FFF8000000000000000, x86_fp80 0xK3FFF8000000000000000, x86_fp80 0xK3FFF8000000000000000>, <4 x x86_fp80> zeroinitializer
73 store <4 x x86_fp80> %tmp, ptr %p, align 16