This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/19150] [3.3/3.4/4.0 Regression] suboptimal fp division with -ffast-math
- From: "uros at kss-loka dot si" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Feb 2005 07:03:40 -0000
- Subject: [Bug target/19150] [3.3/3.4/4.0 Regression] suboptimal fp division with -ffast-math
- References: <20041224192336.19150.pinskia@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From uros at kss-loka dot si 2005-02-14 07:03 -------
The patch for the problem described in description of this bug is actually at
http://gcc.gnu.org/ml/gcc-patches/2004-09/msg01928.html. There is an
inconsistency in simplify_binary_operation(), as decribed in b).
Index: simplify-rtx.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/simplify-rtx.c,v
retrieving revision 1.204
diff -u -p -r1.204 simplify-rtx.c
--- simplify-rtx.c 9 Sep 2004 17:19:16 -0000 1.204
+++ simplify-rtx.c 20 Sep 2004 14:03:51 -0000
@@ -1309,7 +1309,10 @@ simplify_binary_operation (enum rtx_code
REAL_ARITHMETIC (value, rtx_to_tree_code (code), f0, f1);
value = real_value_truncate (mode, value);
- return CONST_DOUBLE_FROM_REAL_VALUE (value, mode);
+ tem = CONST_DOUBLE_FROM_REAL_VALUE (value, mode);
+ if (MEM_P (op0) || MEM_P (op1))
+ tem = validize_mem (force_const_mem (mode, tem));
+ return tem;
}
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19150