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: Move ABS detection from fold-const.c to match.pd



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


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