https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85198
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- And the bug is obvious, rs6000_handle_altivec_attribute only cares about mode of the type and returns precomputed vector types like unsigned_V2DI_type_node etc. based on the mode, rather than different types based on what the element type main variant is.