Page MenuHomePhabricator

[IR][BFloat] add BFloat IR intrinsics support
ClosedPublic

Authored by stuij on May 11 2020, 4:27 AM.

Details

Summary

This patch is part of a series that adds support for the Bfloat16 extension of
the Armv8.6-a architecture, as detailed here:

https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/arm-architecture-developments-armv8-6-a

The bfloat type, and its properties are specified in the Arm Architecture
Reference Manual:

https://developer.arm.com/docs/ddi0487/latest/arm-architecture-reference-manual-armv8-for-armv8-a-architecture-profile

Diff Detail

Event Timeline

stuij created this revision.May 11 2020, 4:27 AM

Hi @stuij ,

thank you for working on this.

I only have a comment on scalable vectors.

Francesco

llvm/include/llvm/IR/Intrinsics.td
283

Can you add the scalable version of these in IntrinsicsAArch64.td, together with those already there?

frapet01@man-08:~/projects/upstream-clang/llvm-project/llvm/include/llvm/IR (5225-LLVM)$ grep "def llvm_nx" *
IntrinsicsAArch64.td:def llvm_nxv2i1_ty  : LLVMType<nxv2i1>;
IntrinsicsAArch64.td:def llvm_nxv4i1_ty  : LLVMType<nxv4i1>;
IntrinsicsAArch64.td:def llvm_nxv8i1_ty  : LLVMType<nxv8i1>;
IntrinsicsAArch64.td:def llvm_nxv16i1_ty : LLVMType<nxv16i1>;
IntrinsicsAArch64.td:def llvm_nxv16i8_ty : LLVMType<nxv16i8>;
IntrinsicsAArch64.td:def llvm_nxv4i32_ty : LLVMType<nxv4i32>;
IntrinsicsAArch64.td:def llvm_nxv2i64_ty : LLVMType<nxv2i64>;
IntrinsicsAArch64.td:def llvm_nxv8f16_ty : LLVMType<nxv8f16>;
IntrinsicsAArch64.td:def llvm_nxv4f32_ty : LLVMType<nxv4f32>;
IntrinsicsAArch64.td:def llvm_nxv2f64_ty : LLVMType<nxv2f64>;
fpetrogalli requested changes to this revision.May 15 2020, 9:07 AM
This revision now requires changes to proceed.May 15 2020, 9:07 AM
stuij updated this revision to Diff 264585.May 18 2020, 4:40 AM

added bfloat SVE MVT type

fpetrogalli accepted this revision.May 20 2020, 4:16 PM

LGTM, thanks!

This revision is now accepted and ready to land.May 20 2020, 4:16 PM
stuij edited the summary of this revision. (Show Details)May 22 2020, 3:11 AM
stuij updated this revision to Diff 266508.May 27 2020, 5:59 AM

resolved conflict where the layout was changed of th IITDescriptorKind enum

This revision was automatically updated to reflect the committed changes.