[Clang][AArch64][SME] Add vector load/store (ld1/st1) intrinsics
authorBryan Chan <bryan.chan@huawei.com>
Mon, 15 May 2023 04:54:45 +0000 (00:54 -0400)
committerBryan Chan <bryan.chan@huawei.com>
Mon, 29 May 2023 01:08:13 +0000 (21:08 -0400)
commit9f6250f591057e68c0bda564716b6918b8e39a84
tree6879605fd26d08b7c90e41e5879a0c55aca8bbdb
parent2aef60532f04b879297a72e55a0975854ba38227
[Clang][AArch64][SME] Add vector load/store (ld1/st1) intrinsics

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

  - svld1_hor_za8      // also for _za16, _za32, _za64 and _za128
  - svld1_hor_vnum_za8 // also for _za16, _za32, _za64 and _za128
  - svld1_ver_za8      // also for _za16, _za32, _za64 and _za128
  - svld1_ver_vnum_za8 // also for _za16, _za32, _za64 and _za128
  - svst1_hor_za8      // also for _za16, _za32, _za64 and _za128
  - svst1_hor_vnum_za8 // also for _za16, _za32, _za64 and _za128
  - svst1_ver_za8      // also for _za16, _za32, _za64 and _za128
  - svst1_ver_vnum_za8 // also for _za16, _za32, _za64 and _za128

SveEmitter.cpp is extended to generate arm_sme.h (currently named
arm_sme_draft_spec_subject_to_change.h) and other SME definitions from
arm_sme.td, which is modeled after arm_sve.td. Common TableGen definitions
are moved into arm_sve_sme_incl.td.

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

Differential Revision: https://reviews.llvm.org/D127910
24 files changed:
clang/include/clang/Basic/BuiltinsAArch64.def
clang/include/clang/Basic/BuiltinsARM.def
clang/include/clang/Basic/BuiltinsNEON.def
clang/include/clang/Basic/BuiltinsSME.def [new file with mode: 0644]
clang/include/clang/Basic/CMakeLists.txt
clang/include/clang/Basic/TargetBuiltins.h
clang/include/clang/Basic/arm_sme.td [new file with mode: 0644]
clang/include/clang/Basic/arm_sve.td
clang/include/clang/Basic/arm_sve_sme_incl.td [new file with mode: 0644]
clang/lib/Basic/Targets/AArch64.cpp
clang/lib/CodeGen/CGBuiltin.cpp
clang/lib/CodeGen/CodeGenFunction.h
clang/lib/Headers/CMakeLists.txt
clang/lib/Sema/SemaChecking.cpp
clang/lib/Sema/SemaDeclAttr.cpp
clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_ld1.c [new file with mode: 0644]
clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_ld1_vnum.c [new file with mode: 0644]
clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_st1.c [new file with mode: 0644]
clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_st1_vnum.c [new file with mode: 0644]
clang/test/Sema/aarch64-sme-intrinsics/acle_sme_imm.cpp [new file with mode: 0644]
clang/test/Sema/aarch64-sme-intrinsics/acle_sme_target.c [new file with mode: 0644]
clang/utils/TableGen/SveEmitter.cpp
clang/utils/TableGen/TableGen.cpp
clang/utils/TableGen/TableGenBackends.h