This is an archive of the discontinued LLVM Phabricator instance.

AVX512: Fix store size of kmask.
ClosedPublic

Authored by igorb on Feb 11 2016, 6:16 AM.

Details

Summary

AVX512: Change store size of kmask. Store size of v8i1, v4i1 , v2i1 and i1 are changed to 16 bits.
If KMOVB not supported (require AVX512DQ) only KMOVW can be used so store size should be 2 bytes.

Diff Detail

Repository
rL LLVM

Event Timeline

igorb updated this revision to Diff 47636.Feb 11 2016, 6:16 AM
igorb retitled this revision from to AVX512: Change store size of kmask..
igorb updated this object.
igorb added a reviewer: delena.
igorb set the repository for this revision to rL LLVM.
igorb added a subscriber: llvm-commits.
delena added inline comments.Feb 11 2016, 6:41 AM
lib/Target/X86/X86ISelLowering.cpp
11979 ↗(On Diff #47636)

You, probably, need a test that covers these new lines.

lib/Target/X86/X86InstrInfo.cpp
4310 ↗(On Diff #47636)

Here should also be one line. And one line comment for each.

igorb updated this revision to Diff 47642.Feb 11 2016, 7:08 AM

Change according to comments.
Thanks for review!

igorb marked an inline comment as done.Feb 11 2016, 7:11 AM
igorb added inline comments.
lib/Target/X86/X86ISelLowering.cpp
11979 ↗(On Diff #47636)

Test already exist in avx512-insert-extract.ll , KNL and SKL are tested.

define i64 @test12(<16 x i64>%a, <16 x i64>%b, i64 %a1, i64 %b1) {

%cmpvector_func.i = icmp slt <16 x i64> %a, %b
%extract24vector_func.i = extractelement <16 x i1> %cmpvector_func.i, i32 0
%res = select i1 %extract24vector_func.i, i64 %a1, i64 %b1
ret i64 %res

}

define i64 @test14(<8 x i64>%a, <8 x i64>%b, i64 %a1, i64 %b1) {

%cmpvector_func.i = icmp slt <8 x i64> %a, %b
%extract24vector_func.i = extractelement <8 x i1> %cmpvector_func.i, i32 4
%res = select i1 %extract24vector_func.i, i64 %a1, i64 %b1
ret i64 %res

}

delena accepted this revision.Feb 14 2016, 11:30 PM
delena edited edge metadata.

LGTM

This revision is now accepted and ready to land.Feb 14 2016, 11:30 PM
igorb retitled this revision from AVX512: Change store size of kmask. to AVX512: Fix store size of kmask..Feb 15 2016, 12:28 AM
igorb edited edge metadata.
This revision was automatically updated to reflect the committed changes.