This series of patches fixes issues with some intrinsics being incorrectly gated by global target options, instad of just using function-specific target options. These issues have been present since the +tme, +memtag and +ls64 intrinsics were introduced.
This series is an rebased and fixed version of the series I sent last November: https://gcc.gnu.org/pipermail/gcc-patches/2023-November/635798.html Patch 1 is updated to fix formatting, and to retain SME error reporting that was merged after the original series was posted. Patch 2 is updated after the creation of aarch64_general_check_builtin_call upstream. Patches 2-4 are also updated to use aarch64_general_simulate_builtin, and to initialise the intrinsics within handle_arm_acle_h. Bootstrapped and regression tested on aarch64. Ok to merge? Also, ok for backports to affected versions (with regression tests)?