This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Use MPFR for real.c decimal-string-to-binary conversions (PR 21718)


On Wed, 20 Nov 2013, Joseph S. Myers wrote:

On Wed, 20 Nov 2013, Marc Glisse wrote:

On Wed, 20 Nov 2013, Joseph S. Myers wrote:

This patch removes real_sqrt.  (I rather hope that in general little
if any floating-point constant folding is happening on RTL - it
doesn't seem like the sort of thing for which RTL expansion should be
expected to introduce new folding opportunities, and if it does I'd
tend to think that indicates a deficiency in the GIMPLE optimizers.)

Bootstrapped with no regressions on x86_64-unknown-linux-gnu.  OK to
commit?

2013-11-20  Joseph Myers  <joseph@codesourcery.com>

	* real.c (real_sqrt): Remove function.
	* real.h (real_sqrt): Remove prototype.
	* simplify-rtx.c (simplify_const_unary_operation): Do not fold
	SQRT using real_sqrt.

I think you can close PR 55950 with that one.

Thanks for the reference - if you have a case where this code is active
(other than where -fno- options are used to disable GIMPLE constant
propagation etc. artificially, although I couldn't find a suitable
testcase even with such options), could you file a PR in Bugzilla for the
missing GIMPLE optimization that results in this only getting optimized
(or not, after this patch) at the RTL level?

Actually, in my case (sqrt(2.) with -frounding-math), constant propagation was not wanted. gimple properly avoided it, and now RTL won't do it either, which is good, no optimization missed.

--
Marc Glisse


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]