[Clang][AArch64][SME] Add vector read/write (mova) intrinsics
authorBryan Chan <bryan.chan@huawei.com>
Thu, 20 Jul 2023 09:50:16 +0000 (05:50 -0400)
committerBryan Chan <bryan.chan@huawei.com>
Thu, 20 Jul 2023 10:06:33 +0000 (06:06 -0400)
commit6dc94c54e51f416d03c42e7d61624419e03a3af6
treeb31aa1a45f096c92b18fee495cc60b90f0ab7161
parent697f60598ec303efc0e9b092af1dbea2c46ebc56
[Clang][AArch64][SME] Add vector read/write (mova) intrinsics

This patch adds support for the following SME ACLE intrinsics (as defined
in https://arm-software.github.io/acle/main/acle.html):

  - svread_hor_za8[_s8]_m    // also for u8
  - svread_hor_za16[_s16]_m  // also for u16, f16, bf16
  - svread_hor_za32[_s32]_m  // also for u32, f32
  - svread_hor_za64[_s64]_m  // also for u64, f64
  - svread_hor_za128[_s8]_m  // also for s16, s32, s64, u8, u16, u32, u64, bf16, f16, f32, f64
  - svread_ver_za8[_s8]_m    // also for u8
  - svread_ver_za16[_s16]_m  // also for u16, f16, bf16
  - svread_ver_za32[_s32]_m  // also for u32, f32
  - svread_ver_za64[_s64]_m  // also for u64, f64
  - svread_ver_za128[_s8]_m  // also for s16, s32, s64, u8, u16, u32, u64, bf16, f16, f32, f64
  - svwrite_hor_za8[_s8]_m   // also for u8
  - svwrite_hor_za16[_s16]_m // also for u16, f16, bf16
  - svwrite_hor_za32[_s32]_m // also for u32, f32
  - svwrite_hor_za64[_s64]_m // also for u64, f64
  - svwrite_hor_za128[_s8]_m // also for s16, s32, s64, u8, u16, u32, u64, bf16, f16, f32, f64
  - svwrite_ver_za8[_s8]_m   // also for u8
  - svwrite_ver_za16[_s16]_m // also for u16, f16, bf16
  - svwrite_ver_za32[_s32]_m // also for u32, f32
  - svwrite_ver_za64[_s64]_m // also for u64, f64
  - svwrite_ver_za128[_s8]_m // also for s16, s32, s64, u8, u16, u32, u64, bf16, f16, f32, f64

Co-authored-by: Sagar Kulkarni <sagar.kulkarni1@huawei.com>
Reviewed By: sdesmalen, kmclaughlin

Differential Revision: https://reviews.llvm.org/D128648
clang/include/clang/Basic/TargetBuiltins.h
clang/include/clang/Basic/arm_sme.td
clang/include/clang/Basic/arm_sve_sme_incl.td
clang/lib/CodeGen/CGBuiltin.cpp
clang/lib/CodeGen/CodeGenFunction.h
clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_read.c [new file with mode: 0644]
clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_write.c [new file with mode: 0644]
clang/test/Sema/aarch64-sme-intrinsics/acle_sme_imm.cpp
clang/utils/TableGen/SveEmitter.cpp