From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4226 invoked by alias); 20 Mar 2010 13:03:01 -0000 Received: (qmail 3035 invoked by uid 48); 20 Mar 2010 13:02:43 -0000 Date: Sat, 20 Mar 2010 13:03:00 -0000 Message-ID: <20100320130243.3034.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/40106] [4.4/4.5 Regression] Weird interaction between optimize_insn_for_speed_p and -funsafe-math-optimizations In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dominiq at lps dot ens dot fr" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-03/txt/msg01953.txt.bz2 ------- Comment #50 from dominiq at lps dot ens dot fr 2010-03-20 13:02 ------- > optimize_insn_for_speed_p is more precise in that it allows hot functions > to be optimized for speed even with -Os. This is quite important for > embedded targets where you generally want to optimize for size but want > performance sensitive parts to be optimized for speed. If so, should not return optimize_function_for_size_p (cfun) || !crtl->maybe_hot_insn_p; be return optimize_function_for_size_p (cfun) && !crtl->maybe_hot_insn_p; i.e., true only if optimize_function_for_size_p is true AND crtl->maybe_hot_insn_p false? In the same line, should not bool optimize_function_for_size_p (struct function *fun) { return (optimize_size || (fun && (fun->function_frequency == FUNCTION_FREQUENCY_UNLIKELY_EXECUTED))); } be bool optimize_function_for_size_p (struct function *fun) { return (optimize_size && (fun && (fun->function_frequency == FUNCTION_FREQUENCY_UNLIKELY_EXECUTED))); } ? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40106