This is a catch all bug report to document failures in combine. There are at least two problems with combine.
1) It only combines chains of instructions that have no other uses of the intermediate results. 2) It functions by generating promising patterns and then seeing if they exist. This is wasteful, in that it generates many patterns that don't exist on the particular target, and it is blind in that it doesn't spot any special cases the target might have. Really combine, which is a generic peepholer, needs some kind of templatizing on the target machine. What's needed is something like pre-reg-alloc peepholes. That of course would be a large amount of work. -- Summary: [meta-bug] combine needs to be templatized like a peepholer Product: gcc Version: 4.0.0 Status: UNCONFIRMED Keywords: missed-optimization, meta-bug Severity: normal Priority: P2 Component: rtl-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: nathan at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18395