In gcc.target/i386/cmov4.c no store sinking is performed for this code for (i = 0; i < ARCHnodes; i++) { nodekind[i] = (int) nodekindf[i]; if (nodekind[i] == 3) nodekind[i] = 1; }
I would expect it to be rewritten as for (i = 0; i < ARCHnodes; i++) { int x = (int) nodekindf[i]; if (x == 3) x = 1; nodekind[i] = x; } -- Summary: missed store sinking opportunity Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: bonzini at gnu dot org OtherBugsDependingO 33157 nThis: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33158