Date: Fri, 3 Feb 2012 21:26:26 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r230959 - stable/8/contrib/gcc Message-ID: <201202032126.q13LQQQ8004822@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Fri Feb 3 21:26:25 2012 New Revision: 230959 URL: http://svn.freebsd.org/changeset/base/230959 Log: MFC: r228756 Clean an inconsistency with -ffinite-math-only. Backported from the gcc-4_3-branch, revision (118001) under the GPLv2. This issue was also fixed in Apple's gcc. PR: 157025 Reviewed by: mm Approved by: jhb (mentor) Modified: stable/8/contrib/gcc/ChangeLog.gcc43 stable/8/contrib/gcc/builtins.c Directory Properties: stable/8/contrib/gcc/ (props changed) Modified: stable/8/contrib/gcc/ChangeLog.gcc43 ============================================================================== --- stable/8/contrib/gcc/ChangeLog.gcc43 Fri Feb 3 21:24:28 2012 (r230958) +++ stable/8/contrib/gcc/ChangeLog.gcc43 Fri Feb 3 21:26:25 2012 (r230959) @@ -96,6 +96,14 @@ * doc/invoke.texi: Add entry about geode processor. +2006-10-24 Richard Guenther <rguenther@suse.de> + + PR middle-end/28796 + * builtins.c (fold_builtin_classify): Use HONOR_INFINITIES + and HONOR_NANS instead of MODE_HAS_INFINITIES and MODE_HAS_NANS + for deciding optimizations in consistency with fold-const.c + (fold_builtin_unordered_cmp): Likewise. + 2006-10-22 H.J. Lu <hongjiu.lu@intel.com> (r117958) * config.gcc (i[34567]86-*-*): Add tmmintrin.h to extra_headers. Modified: stable/8/contrib/gcc/builtins.c ============================================================================== --- stable/8/contrib/gcc/builtins.c Fri Feb 3 21:24:28 2012 (r230958) +++ stable/8/contrib/gcc/builtins.c Fri Feb 3 21:26:25 2012 (r230959) @@ -8720,7 +8720,7 @@ fold_builtin_classify (tree fndecl, tree switch (builtin_index) { case BUILT_IN_ISINF: - if (!MODE_HAS_INFINITIES (TYPE_MODE (TREE_TYPE (arg)))) + if (!HONOR_INFINITIES (TYPE_MODE (TREE_TYPE (arg)))) return omit_one_operand (type, integer_zero_node, arg); if (TREE_CODE (arg) == REAL_CST) @@ -8736,8 +8736,8 @@ fold_builtin_classify (tree fndecl, tree return NULL_TREE; case BUILT_IN_FINITE: - if (!MODE_HAS_NANS (TYPE_MODE (TREE_TYPE (arg))) - && !MODE_HAS_INFINITIES (TYPE_MODE (TREE_TYPE (arg)))) + if (!HONOR_NANS (TYPE_MODE (TREE_TYPE (arg))) + && !HONOR_INFINITIES (TYPE_MODE (TREE_TYPE (arg)))) return omit_one_operand (type, integer_zero_node, arg); if (TREE_CODE (arg) == REAL_CST) @@ -8750,7 +8750,7 @@ fold_builtin_classify (tree fndecl, tree return NULL_TREE; case BUILT_IN_ISNAN: - if (!MODE_HAS_NANS (TYPE_MODE (TREE_TYPE (arg)))) + if (!HONOR_NANS (TYPE_MODE (TREE_TYPE (arg)))) return omit_one_operand (type, integer_zero_node, arg); if (TREE_CODE (arg) == REAL_CST) @@ -8833,13 +8833,13 @@ fold_builtin_unordered_cmp (tree fndecl, if (unordered_code == UNORDERED_EXPR) { - if (!MODE_HAS_NANS (TYPE_MODE (TREE_TYPE (arg0)))) + if (!HONOR_NANS (TYPE_MODE (TREE_TYPE (arg0)))) return omit_two_operands (type, integer_zero_node, arg0, arg1); return fold_build2 (UNORDERED_EXPR, type, arg0, arg1); } - code = MODE_HAS_NANS (TYPE_MODE (TREE_TYPE (arg0))) ? unordered_code - : ordered_code; + code = HONOR_NANS (TYPE_MODE (TREE_TYPE (arg0))) ? unordered_code + : ordered_code; return fold_build1 (TRUTH_NOT_EXPR, type, fold_build2 (code, type, arg0, arg1)); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202032126.q13LQQQ8004822>