------- Comment #11 from bonzini at gnu dot org 2009-08-02 00:15 ------- This is the simplest patch that can possibly work:
Index: ../../gcc/config/i386/i386.c =================================================================== --- ../../gcc/config/i386/i386.c (revision 150334) +++ ../../gcc/config/i386/i386.c (working copy) @@ -14619,7 +14619,7 @@ ix86_fp_comparison_strategy (enum rtx_co if (TARGET_CMOVE) return IX86_FPCMP_COMI; - if (TARGET_SAHF && (TARGET_USE_SAHF || optimize_insn_for_size_p ())) + if (TARGET_SAHF && (TARGET_USE_SAHF || optimize_function_for_size_p (cfun))) return IX86_FPCMP_SAHF; return IX86_FPCMP_ARITH; I'm not sure if there is another patch that can work. :-) Uros, do you think it's fine? I don't think that non-hot FP jumps are that common. Definitely in the minimized testcase it's not a great prediction... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40934