This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add __builtin_riscv_zip/unzip for Zbkb to match gcc.
AbandonedPublic

Authored by craig.topper on Jun 10 2023, 12:55 PM.

Details

Summary

We used zip_32/unzip_32, but gcc omitted the _32. Since we lack
an intrinsic header for Zk* it seemed like we should support the
same builtin names.

Diff Detail

Event Timeline

craig.topper created this revision.Jun 10 2023, 12:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 10 2023, 12:55 PM
craig.topper requested review of this revision.Jun 10 2023, 12:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 10 2023, 12:55 PM
asb added a comment.Jun 13 2023, 2:19 AM

I'm not super familiar with these builtins so this might be a silly question why are the new builtins added in this patch LiLi (long int) rather than ZiZi (int32_t) like the old _32 suffixed builtins?

I'm not super familiar with these builtins so this might be a silly question why are the new builtins added in this patch LiLi (long int) rather than ZiZi (int32_t) like the old _32 suffixed builtins?

In my head I was thinking this would be the name we would use for xlen for i32/i64 too so I was matching clmul. But maybe that's not a good idea. I think we just need to figure out the header file definition for these intrinsics and get both compilers to agree on that.

craig.topper abandoned this revision.Jun 27 2023, 4:48 PM