> so I suggest to do a similar VECTOR_MODE_P check and your original test. > So > > && (!VECTOR_MODE_P (TYPE_MODE (newtype)) > || target_supports_op_p (newtype, op, optab_default)) > > OK with that change.
Separate patch or into the original one? We needed element_mode because TYPE_MODE wouldn't work for a vector_mode so it still somehow fits. Apart from that, out of curiosity, do we want the same optab mechanism (try widening/widened op if the original one failed) for vector types as well in the future? Regards Robin