https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70497
Bug ID: 70497 Summary: Missed CSE of subregs on GIMPLE Product: gcc Version: 6.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- RTL DSE handles removing the redundand load (and thus 'u' itself) in union U { int i[16]; char c; }; char foo(int i) { union U u; u.i[0] = i; return u.c; } but nothing on GIMPLE does that. FRE could do this, replacing u.c with proper sub-setting of i (via a cast or a BIT_FIELD_REF).