https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93080
Bug ID: 93080 Summary: insert of an extraction on the same location is not optimized Product: gcc Version: 10.0 Status: UNCONFIRMED Keywords: missed-optimization, TREE Severity: enhancement Priority: P3 Component: tree-optimization Assignee: pinskia at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- testcase: /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-optimized" } */ #define vector __attribute__((__vector_size__(16) )) vector int g(vector int a) { int b = a[0]; a[0] = b; return a; } /* { dg-final { scan-tree-dump-times "BIT_INSERT_EXPR" 0 "optimized" } } */ /* { dg-final { scan-tree-dump-times "BIT_FIELD_REF" 0 "optimized" } } */ ---- CUT ----