We could have define_expand patterns in i386.md to generate better initial RTL for expanding MIN_EXPR and MAX_EXPR, using a mov and a cmov. Perhaps in the pre-tree-ssa era this wasn't profitable, but now we could expand to almost optimal code without branches, after having optimized so much on trees already. I'll experiment a bit with this idea for GCC 4.1.
-- Summary: [x86][amd64] Could have better initial RTL generation for MIN/MAX Product: gcc Version: 4.0.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement Priority: P3 Component: target AssignedTo: steven at gcc dot gnu dot org ReportedBy: steven at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19069