AVX-512: Fixed a bug in extracting subvector from v64i1

By Igor Breger (igor.breger@intel.com)

llvm-svn: 238322
This commit is contained in:
Elena Demikhovsky 2015-05-27 14:09:33 +00:00
parent 0cb78b3b2a
commit 86c7b46680
2 changed files with 17 additions and 0 deletions

View File

@ -1893,6 +1893,8 @@ let Predicates = [HasAVX512] in {
def : Pat<(i32 (zext VK1:$src)),
(AND32ri (KMOVWrk (COPY_TO_REGCLASS VK1:$src, VK16)), (i32 1))>;
def : Pat<(i32 (anyext VK1:$src)),
(KMOVWrk (COPY_TO_REGCLASS VK1:$src, VK16))>;
def : Pat<(i8 (zext VK1:$src)),
(EXTRACT_SUBREG
(AND32ri (KMOVWrk
@ -2223,6 +2225,12 @@ def : Pat<(v16i1 (insert_subvector undef, (v8i1 VK8:$src), (iPTR 0))),
def : Pat<(v8i1 (extract_subvector (v16i1 VK16:$src), (iPTR 8))),
(v8i1 (COPY_TO_REGCLASS (KSHIFTRWri VK16:$src, (i8 8)), VK8))>;
def : Pat<(v32i1 (extract_subvector (v64i1 VK64:$src), (iPTR 0))),
(v32i1 (COPY_TO_REGCLASS VK64:$src, VK32))>;
def : Pat<(v32i1 (extract_subvector (v64i1 VK64:$src), (iPTR 32))),
(v32i1 (COPY_TO_REGCLASS (KSHIFTRQri VK64:$src, (i8 32)), VK32))>;
let Predicates = [HasVLX] in {
def : Pat<(v8i1 (insert_subvector undef, (v4i1 VK4:$src), (iPTR 0))),
(v8i1 (COPY_TO_REGCLASS VK4:$src, VK8))>;

View File

@ -950,3 +950,12 @@ define void @extload_v8i64(<8 x i8>* %a, <8 x i64>* %res) {
ret void
}
;SKX-LABEL: test21:
;SKX: vmovdqu16 %zmm0, %zmm3 {%k1}
;SKX-NEXT: kshiftrq $32, %k1, %k1
;SKX-NEXT: vmovdqu16 %zmm1, %zmm2 {%k1}
define <64 x i16> @test21(<64 x i16> %x , <64 x i1> %mask) nounwind readnone {
%ret = select <64 x i1> %mask, <64 x i16> %x, <64 x i16> zeroinitializer
ret <64 x i16> %ret
}