This is an archive of the discontinued LLVM Phabricator instance.

[Clang][VE] Add the rest of intrinsics to clang
ClosedPublic

Authored by kaz7 on Mar 14 2022, 4:06 AM.

Details

Summary

Add the rest of intrinsics to clang except intrinsics using vector mask
registers.

Diff Detail

Event Timeline

kaz7 created this revision.Mar 14 2022, 4:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 14 2022, 4:06 AM
Herald added a subscriber: mgorny. · View Herald Transcript
kaz7 requested review of this revision.Mar 14 2022, 4:06 AM
kaz7 updated this revision to Diff 415064.Mar 14 2022, 4:42 AM

Correct the order of #include

simoll added inline comments.Mar 14 2022, 6:09 AM
clang/include/clang/Basic/BuiltinsVEVL.gen.def
1242

Could you comment at the top of this file (i know, again) that the #if 0-ed and commented-out parts are because of the missing mask vector type?

clang/lib/Headers/velintrin.h
65

Is there any particular reason the parameters are signed?

kaz7 updated this revision to Diff 415081.Mar 14 2022, 6:24 AM
kaz7 marked 2 inline comments as done.

Change code to follow suggestions.

kaz7 added inline comments.Mar 14 2022, 6:26 AM
clang/include/clang/Basic/BuiltinsVEVL.gen.def
1242

I don't want to add at the top of this file bacause this file is automatically generated and I don't want to use any structured comments. But, I added comments at the each point of #if 0 and added comments at the place where include this file.

clang/lib/Headers/velintrin.h
65

I guess no. So, I changed the code following your suggestion.

This revision is now accepted and ready to land.Mar 14 2022, 6:31 AM
xbolva00 added inline comments.
clang/include/clang/Basic/BuiltinsVEVL.gen.def
35

Why leave dead code under comments? Bad habit, remove it please.

kaz7 added inline comments.Mar 14 2022, 7:49 AM
clang/include/clang/Basic/BuiltinsVEVL.gen.def
35

Thank you for the comments. What is the best way to leave a list of functions need to be supported in near future? Should I just make a list of function names using vector mask registers instead of writing them down with "BUILTIN" for future reference?

@kaz7 With rG0aab34410403 in tree you should be able to enable the masked intrinsics now.

kaz7 updated this revision to Diff 415839.Mar 16 2022, 8:16 AM

Rebased and removed whole dead codes as requested.

This revision was landed with ongoing or failed builds.Mar 16 2022, 8:17 AM
This revision was automatically updated to reflect the committed changes.
clang/lib/Headers/velintrin_gen.h