From: Kyrylo Tkachov Date: Tue, 21 Jul 2015 08:26:32 +0000 (+0000) Subject: [match.pd] PR middle-end/66915 Restrict A - B -> A + (-B) to non-fixed-point types X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e4e96a4f372d721bf099e5169ca3b5342bc0f9e1;p=gcc.git [match.pd] PR middle-end/66915 Restrict A - B -> A + (-B) to non-fixed-point types PR middle-end/66915 * match.pd (A - B -> A + (-B)): Don't allow folding when type if a fixed-point type. From-SVN: r226028 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 58a2233297b..4ede93948c4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-07-21 Kyrylo Tkachov + + PR middle-end/66915 + * match.pd (A - B -> A + (-B)): Don't allow folding + when type if a fixed-point type. + 2015-07-20 DJ Delorie * config/rl78/rl78-real.md (andqi3_real): Expand operands for clr1. diff --git a/gcc/match.pd b/gcc/match.pd index 700a6922295..4226fb16c36 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -510,8 +510,8 @@ along with GCC; see the file COPYING3. If not see /* A - B -> A + (-B) if B is easily negatable. */ (simplify (minus @0 negate_expr_p@1) - (plus @0 (negate @1))) - + (if (!FIXED_POINT_TYPE_P (type)) + (plus @0 (negate @1)))) /* Try to fold (type) X op CST -> (type) (X op ((type-x) CST)) when profitable.