This series of patches fixes issues with some intrinsics being incorrectly gated by global target options, instead of just using function-specific target options. These issues have been present since the +tme, +memtag and +ls64 intrinsics were introduced.
Bootstrapped and regression tested on aarch64. Ok to merge? Also, ok for backports to all open affected versions (with regression tests)? I believe the first three patches will apply cleanly back to GCC 11. The ls64 intrinsics were only added in GCC 12, and have recently had their implementation changed, so I'll send a separate backport patch for approval once this series is merged.