This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Move ABS detection from fold-const.c to match.pd
- From: Marc Glisse <marc dot glisse at inria dot fr>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 24 May 2015 15:17:52 +0200 (CEST)
- Subject: Re: Move ABS detection from fold-const.c to match.pd
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 02 dot 1505231828530 dot 22033 at stedding dot saclay dot inria dot fr>
I forgot to mention I optimistically tried to write something like this:
(match
(negated_value_for_comparison @0)
(negate @0))
(match
(negated_value_for_comparison (negate @0))
@0)
(match
(negated_value_for_comparison (minus @0 @1))
(if (!HONOR_SIGN_DEPENDENT_ROUNDING (type))
(minus @1 @0))
without success. There is already a comment for logical_inverted_value
about related limitations in genmatch.
--
Marc Glisse