https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96974
--- Comment #9 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> --- (In reply to Stam Markianos-Wright from comment #8) > I have a liiitle bit more progress here, but I have a question about > vect_get_smallest_scalar_type. > > If we look at the comment before the function: > > >/* Return the smallest scalar part of STMT_INFO. > > This is used to determine the vectype of the stmt. We generally set the > > vectype according to the type of the result (lhs). For stmts whose > > result-type is different than the type of the arguments (e.g., demotion, > > promotion), vectype will be reset appropriately (later). Note that we > > have > > to visit the smallest datatype in this function, because that determines > > the > > VF. If the smallest datatype in the loop is present only as the rhs of a > > promotion operation - we'd miss it. > > Would this be "smallest datatype in all cases", or is this more like "the > smallest > datatype within the same promotion/demotion chain"? > > i.e. how should we react if we detect a smallest datatype on the rhs of > "float" > when everything else in the stmt has been in the integer chain (int or, > like in this case, long int)? Not sure if this is really answering the question (let me know if it's not), but: for an lhs of int and an rhs of float, the choice doesn't really matter, since they're the same size. But for an lhs of long int and an rhs of float, the smallest vectype has to be taken from the float.