http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53260
Bug #: 53260 Summary: cse doesn't record REG_EQUAL notes for function invariants Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: rtl-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: rsand...@gcc.gnu.org CSE adds REG_EQUAL notes for constant equivalences that it finds: /* If this is a single SET, we are setting a register, and we have an equivalent constant, we want to add a REG_NOTE. We don't want to write a REG_EQUAL note for a constant pseudo since verifying that that pseudo hasn't been eliminated is a pain. Such a note also won't help anything. It might be worth extending this to function_invariant_p, so that reload has the option of eliminating registers that are equivalent to known frame addresses. A hacked-up patch to do this showed a surprising number of differences, but I haven't had chance to see whether they're good or bad.