On Wed, Aug 30, 2023 at 11:15 AM Andre Vieira (lists) via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > This patch adds a machine_mode parameter to the TARGET_SIMD_CLONE_USABLE > hook to enable rejecting SVE modes when the target architecture does not > support SVE.
How does the graph node of the SIMD clone lack this information? That is, it should have information on the types (and thus modes) for all formal arguments and return values already, no? At least the target would know how to instantiate it if it's not readily available at the point of use. > gcc/ChangeLog: > > * config/aarch64/aarch64.cc (aarch64_simd_clone_usable): Add mode > parameter and use to to reject SVE modes when target architecture does > not support SVE. > * config/gcn/gcn.cc (gcn_simd_clone_usable): Add unused mode > parameter. > * config/i386/i386.cc (ix86_simd_clone_usable): Likewise. > * doc/tm.texi (TARGET_SIMD_CLONE_USABLE): Document new parameter. > * target.def (usable): Add new parameter. > * tree-vect-stmts.cc (vectorizable_simd_clone_call): Pass vector mode > to TARGET_SIMD_CLONE_CALL hook.