• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
4
5target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
6target triple = "x86_64-unknown-linux-gnu"
7
8 define void @test(<4 x i1> %m, <4 x x86_fp80> %v, <4 x x86_fp80>*%p) local_unnamed_addr {
9; KNL-LABEL: test:
10; KNL:       # %bb.0: # %bb
11; KNL-NEXT:    vpslld $31, %xmm0, %xmm0
12; KNL-NEXT:    vptestmd %zmm0, %zmm0, %k0
13; KNL-NEXT:    kshiftrw $1, %k0, %k1
14; KNL-NEXT:    kmovw %k1, %eax
15; KNL-NEXT:    kshiftrw $2, %k0, %k1
16; KNL-NEXT:    kshiftrw $1, %k1, %k2
17; KNL-NEXT:    kmovw %k1, %ecx
18; KNL-NEXT:    testb $1, %al
19; KNL-NEXT:    fld1
20; KNL-NEXT:    fldz
21; KNL-NEXT:    fld %st(0)
22; KNL-NEXT:    fcmovne %st(2), %st
23; KNL-NEXT:    testb $1, %cl
24; KNL-NEXT:    fld %st(1)
25; KNL-NEXT:    fcmovne %st(3), %st
26; KNL-NEXT:    kmovw %k2, %eax
27; KNL-NEXT:    testb $1, %al
28; KNL-NEXT:    fld %st(2)
29; KNL-NEXT:    fcmovne %st(4), %st
30; KNL-NEXT:    kmovw %k0, %eax
31; KNL-NEXT:    testb $1, %al
32; KNL-NEXT:    fxch %st(3)
33; KNL-NEXT:    fcmovne %st(4), %st
34; KNL-NEXT:    fstp %st(4)
35; KNL-NEXT:    fxch %st(3)
36; KNL-NEXT:    fstpt (%rdi)
37; KNL-NEXT:    fxch %st(1)
38; KNL-NEXT:    fstpt 30(%rdi)
39; KNL-NEXT:    fxch %st(1)
40; KNL-NEXT:    fstpt 20(%rdi)
41; KNL-NEXT:    fstpt 10(%rdi)
42; KNL-NEXT:    vzeroupper
43; KNL-NEXT:    retq
44;
45; SKX-LABEL: test:
46; SKX:       # %bb.0: # %bb
47; SKX-NEXT:    vpslld $31, %xmm0, %xmm0
48; SKX-NEXT:    vpmovd2m %xmm0, %k0
49; SKX-NEXT:    kshiftrb $1, %k0, %k1
50; SKX-NEXT:    kmovd %k1, %eax
51; SKX-NEXT:    kshiftrb $2, %k0, %k1
52; SKX-NEXT:    kshiftrb $1, %k1, %k2
53; SKX-NEXT:    kmovd %k1, %ecx
54; SKX-NEXT:    testb $1, %al
55; SKX-NEXT:    fld1
56; SKX-NEXT:    fldz
57; SKX-NEXT:    fld %st(0)
58; SKX-NEXT:    fcmovne %st(2), %st
59; SKX-NEXT:    testb $1, %cl
60; SKX-NEXT:    fld %st(1)
61; SKX-NEXT:    fcmovne %st(3), %st
62; SKX-NEXT:    kmovd %k2, %eax
63; SKX-NEXT:    testb $1, %al
64; SKX-NEXT:    fld %st(2)
65; SKX-NEXT:    fcmovne %st(4), %st
66; SKX-NEXT:    kmovd %k0, %eax
67; SKX-NEXT:    testb $1, %al
68; SKX-NEXT:    fxch %st(3)
69; SKX-NEXT:    fcmovne %st(4), %st
70; SKX-NEXT:    fstp %st(4)
71; SKX-NEXT:    fxch %st(3)
72; SKX-NEXT:    fstpt (%rdi)
73; SKX-NEXT:    fxch %st(1)
74; SKX-NEXT:    fstpt 30(%rdi)
75; SKX-NEXT:    fxch %st(1)
76; SKX-NEXT:    fstpt 20(%rdi)
77; SKX-NEXT:    fstpt 10(%rdi)
78; SKX-NEXT:    retq
79 bb:
80   %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
81   store <4 x x86_fp80> %tmp, <4 x x86_fp80>* %p, align 16
82   ret void
83 }
84
85