[PATCH] D135615: [AArch64][ARM] Alter v8.1a neon intrinsics to be target-based, not preprocessor based

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 10 13:22:25 PDT 2022


dmgreen created this revision.
dmgreen added reviewers: danielkiss, ilinpv, sdesmalen, simon_tatham, stuij, efriedma, t.p.northover.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
dmgreen requested review of this revision.
Herald added a project: LLVM.

As a continuation of D132034 <https://reviews.llvm.org/D132034>, this switches the QRDMX v8.1a neon intrinsics over from preprocessor defines to be target-gated. As there is no "rdma" or "qrdmx" target feature, they use the "v8.1a" architecture feature directly.

This works well for AArch64, but something needs to be done for Arm at the same time, as they both use the same header and tablegen emitter. This patch opts for adding "v8.1a" and all dependant target features to the Arm TargetParser, similar to what was recently done for AArch64 but through initFeatureMap when the Architecture is parsed. I attempted to make the code similar to the AArch64 backend. Alternative suggestions are welcome.

Otherwise this is similar to the changes made in D132034 <https://reviews.llvm.org/D132034>.


https://reviews.llvm.org/D135615

Files:
  clang/include/clang/Basic/arm_neon.td
  clang/lib/Basic/Targets/ARM.cpp
  clang/lib/CodeGen/CGBuiltin.cpp
  clang/test/CodeGen/arm-target-features.c
  clang/test/Sema/aarch64-neon-target.c
  clang/test/Sema/arm-neon-target.c
  llvm/include/llvm/Support/ARMTargetParser.h
  llvm/lib/Support/ARMTargetParser.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135615.466594.patch
Type: text/x-patch
Size: 16822 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221010/0a40118a/attachment.bin>


More information about the llvm-commits mailing list