From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11505 invoked by alias); 25 Aug 2006 09:01:11 -0000 Received: (qmail 11468 invoked by uid 48); 25 Aug 2006 09:01:02 -0000 Date: Fri, 25 Aug 2006 09:01:00 -0000 Message-ID: <20060825090102.11467.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/19116] -funsafe-math-optimizations make nan compares equal to one another (-finite-math-only should be doing that) In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-08/txt/msg02114.txt.bz2 List-Id: ------- Comment #10 from rguenth at gcc dot gnu dot org 2006-08-25 09:01 ------- Mine. This "regression" was introduced at the time we got rid of flag_fast_math and changed it to either flag_unsafe_math_optimizations or flag_trapping_math. +2001-03-07 Brad Lucier + + * builtins.c (expand_builtin_mathfn): Check + flag_unsafe_math_optimizations, not flag_fast_math. + (expand_builtin): Likewise + * combine.c (combine_simplify_rtx): Likewise. + (simplify_if_then_else): Likewise. + * cse.c (fold_rtx): Likewise. + * flags.h: Remove flag_fast_math. Add + flag_unsafe_math_optimizations and flag_trapping_math. + * fold-const.c (negate_expr): Check + flag_unsafe_math_optimizations, not flag_fast_math. + (invert_truthvalue): Likewise. + (fold): Likewise. Before associating operands, check that + code == MULT_EXPR, not code != MULT_EXPR. + * ifcvt.c (noce_try_minmax): Check + flag_unsafe_math_optimizations, not flag_fast_math. + (noce_operand_ok): Check flag_trapping_math, not flag_fast_math. + * invoke.texi: Document -funsafe-math-optimizations and + -fno-trapping-math. Change documentation for -ffast-math. + * jump.c (reversed_comparison_code_parts): Likewise. + (rtx_equal_for_thread_p): Likewise. + * optabs.c (emit_conditional_move): Likewise. + * simplify-rtx.c (simplify_binary_operation): Likewise. + (simplify_relational_operation): Likewise. + (simplify_ternary_operation): Likewise. + * toplev.c: Remove flag_fast_math. Add flag_trapping_math and + flag_unsafe_math_optimizations. Remove fast-math entry from f_options. + Add trapping-math and unsafe-math-optimizations entries to f_options. + (set_fast_math_flags): New, sets flags for -ffast-math. + (set_no_fast_math_flags): New, sets flags for -fno-fast-math. + (decode_f_option): Add code to handle -ffast-math and -fno-fast-math. + * toplev.h: Declare set_fast_math_flags and set_no_fast_math_flags. + + * config/alpha/alpha.c (alpha_emit_conditional_branch): Likewise. + (alpha_emit_conditional_move): Initialize local_fast_math to + flag_unsafe_math_optimizations, not flat_fast_math. + * config/c4x/c4x.c (c4x_override_options): Call set_fast_math_flags + instead of setting flag_fast_math to 1. + * config/convex/convex.md: Check flag_unsafe_math_optimizations, + not flag_fast_math. + * config/i386/i386.c (override_options): Likewise + * config/i386/i386.md: Likewise. + * config/m68k/m68k.md: Likewise. + * config/mips/mips.md: Likewise. + * config/rs6000/rs6000.c (validate_condition_mode): Likewise. + (rs6000_generate_compare): Likewise. Later flag_finite_math_only was introduced but not all other places fixed. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Last reconfirmed|2005-09-24 16:53:42 |2006-08-25 09:01:01 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19116