diff --git a/gcc/config/aarch64/aarch64-sve-builtins-shapes.cc b/gcc/config/aarch64/aarch64-sve-builtins-shapes.cc index 2692b086ac5..f190770250f 100644 --- a/gcc/config/aarch64/aarch64-sve-builtins-shapes.cc +++ b/gcc/config/aarch64/aarch64-sve-builtins-shapes.cc @@ -338,6 +338,14 @@ build_one (function_builder &b, const char *signature, unsigned int ti, unsigned int gi, unsigned int pi, bool force_direct_overloads) { + /* For simplicity, function definitions are allowed to use the group + suffix lists vg2 and vg4 for shapes that have _single forms, + even though the _single form applies only to vgNx2 and vgNx4, + not to vgNx1. */ + if (mode_suffix_id == MODE_single + && group_suffixes[group.groups[gi]].vectors_per_tuple == 1) + return; + /* Byte forms of svdupq take 16 arguments. */ auto_vec argument_types; function_instance instance (group.base_name, *group.base, *group.shape,