[AArch64] Alter arm_sve.h to be target-based, not preprocessor based.
This patch makes SVE intrinsics more useable by gating them on the target, not by ifdef preprocessor macros. See #56480. This alters the SVEEmitter for arm_sve.h to remove the #ifdef guards and instead use TARGET_BUILTIN with the correct features so that the existing "'func' needs target feature sve" error will be generated when sve is not present. The ArchGuard containing defines in the SVEEmitter are changed to TargetGuard containing target features. In the arm_neon.h emitter there are both existing ArchGuard ifdefs mixed with new TargetGuard target feature guards, so the name is change in the SVE too for consistency. The few functions that are present in arm_sve.h (as opposed to builtin aliases) have __attribute__((target("sve"))) added. Some of the tests needed to be rejigged a little, as well as updating the error message, as the error now happens at a later point. Differential Revision: https://reviews.llvm.org/D131064
Loading
Please sign in to comment