This patch adds a new target hook to enable us to adapt the types of return and parameters of simd clones. We use this in two ways, the first one is to make sure we can create valid SVE types, including the SVE type attribute, when creating a SVE simd clone, even when the target options do not support SVE. We are following the same behaviour seen with x86 that creates simd clones according to the ABI rules when no simdlen is provided, even if that simdlen is not supported by the current target options. Note that this doesn't mean the simd clone will be used in auto-vectorization. gcc/ChangeLog: (TARGET_SIMD_CLONE_ADJUST_RET_OR_PARAM): Define. * doc/tm.texi (TARGET_SIMD_CLONE_ADJUST_RET_OR_PARAM): Document. * doc/tm.texi.in (TARGET_SIMD_CLONE_ADJUST_RET_OR_PARAM): New. * omp-simd-clone.cc (simd_adjust_return_type): Call new hook. (simd_clone_adjust_argument_types): Likewise. * target.def (adjust_ret_or_param): New hook. * targhooks.cc (default_simd_clone_adjust_ret_or_param): New. * targhooks.h (default_simd_clone_adjust_ret_or_param): New.