On Sun, Aug 29, 2021 at 12:11:23PM -0700, H.J. Lu wrote: > --- a/gcc/config/i386/i386.c > +++ b/gcc/config/i386/i386.c > @@ -1840,6 +1840,54 @@ init_cumulative_args (CUMULATIVE_ARGS *cum, /* > Argument info to initialize */ > cfun->machine->arg_reg_available = (cum->nregs > 0); > } > > +/* Return the single 64-bit vector type of TYPE. */ > + > +static const_tree > +single_m64_base_type (const_tree type) > +{ > + if ((TREE_CODE (type) == RECORD_TYPE > + || TREE_CODE (type) == UNION_TYPE > + || TREE_CODE (type) == QUAL_UNION_TYPE) > + && int_size_in_bytes (type) == 8) > + { > + const_tree field; > + const_tree first_field = nullptr; > + > + for (field = TYPE_FIELDS (type); > + field; > + field = DECL_CHAIN (field)) > + if (TREE_CODE (field) == FIELD_DECL) > + { > + if (TREE_TYPE (field) == error_mark_node) > + continue; > + > + /* Skip if structure has more than one field. */ > + if (first_field) > + return nullptr; > + > + first_field = field; > + } > + > + /* Skip if structure doesn't have any fields. */ > + if (!first_field) > + return nullptr;
Is this an attempt to emulate compute_record_mode or something else? How should it treat zero-width bitfields (either the C ones kept in the structures or C++ ones formerly removed from them and now no longer)? compute_record_mode actually has more complicated details... Jakub