This is an archive of the discontinued LLVM Phabricator instance.

AVX512 : vplzcnt and vpconflict implemantation
ClosedPublic

Authored by igorb on Aug 11 2015, 1:22 AM.

Details

Summary

AVX512: Implemented encoding and intrinsics for

vplzcntq, vplzcntd, vpconflictq, vpconflictd

Added tests for intrinsics and encoding.

Diff Detail

Repository
rL LLVM

Event Timeline

igorb updated this revision to Diff 31776.Aug 11 2015, 1:22 AM
igorb retitled this revision from to AVX512 : vplzcnt and vpconflict implemantation.
igorb updated this object.
igorb added reviewers: delena, AsafBadouh.
igorb set the repository for this revision to rL LLVM.
igorb added a subscriber: llvm-commits.
delena added inline comments.Sep 2 2015, 11:19 PM
include/llvm/IR/IntrinsicsX86.td
5565 ↗(On Diff #31776)

AVX-512 conflict detection instructions
Instructions that count the number of leading zero bits

lib/Target/X86/X86ISelLowering.cpp
1484 ↗(On Diff #31776)

You should add a test that checks this.

test/CodeGen/X86/avx512cdvl-intrinsics.ll
190 ↗(On Diff #31776)

remove empty lines

igorb updated this revision to Diff 33908.Sep 3 2015, 1:35 AM
igorb marked 3 inline comments as done.

added lowering for CTLZ_ZERO_UNDEF

This revision was automatically updated to reflect the committed changes.
RKSimon added a subscriber: RKSimon.Sep 5 2015, 7:42 AM

Hi Igor,

Have you looked into promoting i8/i16 vector CTLZ to use the dword LZCNT instruction (trunc(sub(lzcnt(zext(x))))?

Cheers, Simon.

igorb added a comment.Sep 6 2015, 12:36 AM

Hi Igor,

Have you looked into promoting i8/i16 vector CTLZ to use the dword LZCNT instruction (trunc(sub(lzcnt(zext(x))))?

Cheers, Simon.

This is a good idea, I will implement it.

Have you looked into promoting i8/i16 vector CTLZ to use the dword LZCNT instruction (trunc(sub(lzcnt(zext(x))))?

This is a good idea, I will implement it.

Cheers, this should help CTTZ_UNDEF lowering (D12663) as well.