https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98254
--- Comment #4 from rguenther at suse dot de <rguenther at suse dot de> --- On December 12, 2020 8:36:07 PM GMT+01:00, "jakub at gcc dot gnu.org" <gcc-bugzi...@gcc.gnu.org> wrote: >https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98254 > >--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- >(In reply to rguent...@suse.de from comment #2) >> Should already be handled by vectorizing the CTOR. > >I've tried: > >typedef int __attribute__((vector_size(16))) V; > >V >foo (short *a) >{ > return (V){a[0], a[1], a[2], a[3]}; >} > >V >bar (int *a) >{ > return (V){a[0], a[1], a[2], a[3]}; >} > >and we don't do a vector (unaligned) read even in bar with -O3 >-fno-tree-slp-vectorize, it is just SLP vectorization that makes it >vectorize. >If we should handle foo as convertvector, we should handle bar in the >same spot >as vector load from memory. I see. Forwprop handles some conversions already, would need to check what is missing for this case.