This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add C intrinsics for scalar bitmanip and crypto
ClosedPublic

Authored by craig.topper on Jul 18 2023, 2:57 PM.

Details

Summary

This adds riscv_bitmanip and riscv_crypto.h

This is based on the proposed spec here https://github.com/riscv-non-isa/riscv-c-api-doc/pull/44

Tests that previously used builtins directly now use the intrinsics.

Diff Detail

Event Timeline

craig.topper created this revision.Jul 18 2023, 2:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 18 2023, 2:57 PM
craig.topper requested review of this revision.Jul 18 2023, 2:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 18 2023, 2:57 PM
Herald added subscribers: eopXD, MaskRay. · View Herald Transcript

git add the header

Fix file description

Fix name of zip/unzip builtin

Can we run mem2reg pass in RUNs just like RVV tests (maybe another cleanup patch)? I think there are a lot of noises in CHECKS.

Rebase after using mem2reg.
Fix a couple copy/paste mistakes that were much easier to spot with mem2reg.

Add riscv_bitmanip.h to cover all of Zbb and Zbkb

craig.topper retitled this revision from [RISCV] Add C intrinsics for scalar crypto to [RISCV] Add C intrinsics for scalar bitmanip and crypto.Aug 1 2023, 9:58 PM
craig.topper edited the summary of this revision. (Show Details)

LGTM, But waiting for other reviewers.

wangpc accepted this revision.Aug 21 2023, 1:23 AM

LGTM if the proposal is merged.

This revision is now accepted and ready to land.Aug 21 2023, 1:23 AM
Kakadu added a subscriber: Kakadu.Aug 30 2023, 11:30 AM
Herald added a project: Restricted Project. · View Herald TranscriptFri, Nov 24, 4:17 PM