https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93237
Bug ID: 93237 Summary: vector defined using inserts is not converted into constructors Product: gcc Version: 10.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement Priority: P3 Component: tree-optimization Assignee: pinskia at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- Take this stupid code: /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-optimized" } */ #define vector __attribute__((__vector_size__(4*sizeof(int)) )) vector int f(int b) { vector int a = {0,0,0,0}; a[0] = b; a[1] = b; a[2] = b; a[3] = b; return a; } /* { dg-final { scan-tree-dump-times "BIT_INSERT_EXPR" 0 "optimized" } } */ ----- CUT --- In the end, we should generate a CONSTRUCTOR with just b's.