[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
This commit is contained in:
Kyrylo Tkachov 2015-07-21 08:26:32 +00:00 committed by Kyrylo Tkachov
parent 2ac74346d8
commit e4e96a4f37
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2015-07-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
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 <dj@redhat.com>
* config/rl78/rl78-real.md (andqi3_real): Expand operands for clr1.

View File

@ -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.