This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]: PR middle-end/31796 use MPFR to evaluate remquo/remainder/drem at compile-time
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Kaveh R. GHAZI" <ghazi at caip dot rutgers dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 17 May 2007 11:59:31 +0200
- Subject: Re: [PATCH]: PR middle-end/31796 use MPFR to evaluate remquo/remainder/drem at compile-time
- References: <Pine.GSO.4.58.0705051328590.14660@caipclassic.rutgers.edu>
On 5/5/07, Kaveh R. GHAZI <ghazi@caip.rutgers.edu> wrote:
This patch address PR middle-end/31796. It uses MPFR to evaluate remquo,
remainder and drem at compile-time when they are supplied with constant
arguments.
This patch relies on the follow two previous (and as yet unreviewed)
patches to apply cleanly:
http://gcc.gnu.org/ml/gcc-patches/2007-04/msg01624.html
http://gcc.gnu.org/ml/gcc-patches/2007-04/msg01663.html
Tested on sparc-sun-solaris2.10, no regressions and the new tests all
pass.
Okay for mainline?
This is ok if you XFAIL the testcases that require new mpfr. Also please
consider adding new testcase files for those that need XFAILing (I
suppose builtin-math-4.c is from some other patch taht did not went in
yet).
Richard.
:REVIEWMAIL:
Thanks,
--Kaveh
:ADDPATCH middle-end:
2007-05-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
PR middle-end/31796
* builtins.c (do_mpfr_remquo): New.
(fold_builtin_2): Handle BUILT_IN_DREM/BUILT_IN_REMAINDER.
(fold_builtin_3): Handle BUILT_IN_REMQUO.
testsuite:
* gcc.dg/torture/builtin-math-2.c: Add tests for remquo, remainder
and drem.
* gcc.dg/torture/builtin-math-4.c: Likewise.