This is an archive of the discontinued LLVM Phabricator instance.

[ARM,MVE] Add intrinsics vclzq and vclsq.
ClosedPublic

Authored by simon_tatham on Feb 10 2020, 8:54 AM.

Details

Summary

vclzq maps nicely to the existing target-independent @llvm.ctlz IR
intrinsic. But vclsq ('count leading sign bits') has no corresponding
target-independent intrinsic, so I've made up @llvm.arm.mve.vcls.

This commit adds the unpredicated forms only.

Diff Detail

Event Timeline

simon_tatham created this revision.Feb 10 2020, 8:54 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptFeb 10 2020, 8:54 AM

Spotted a mistake by myself: I had accidentally implemented the vclsq intrinsics for unsigned integer types as well as signed. ACLE only defines them for signed integers.

Also rebased to current master.

miyuki accepted this revision.Feb 12 2020, 2:14 AM

LGTM

This revision is now accepted and ready to land.Feb 12 2020, 2:14 AM
This revision was automatically updated to reflect the committed changes.