]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR middle-end/23294 (fold does not fold a*C+a to a*(C+1) or a*C-a to a*(C-1))
authorRichard Guenther <rguenther@suse.de>
Sat, 19 Nov 2005 11:29:10 +0000 (11:29 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Sat, 19 Nov 2005 11:29:10 +0000 (11:29 +0000)
commit0ed9a3e3143e00af1ed3f1793dd10cd8d6507de4
tree21498ed60c2bf5fd17466e15a033794c45a3a290
parent0e32f9bcd598f6e2fef33a2278bd65f656ebf806
re PR middle-end/23294 (fold does not fold a*C+a to a*(C+1) or a*C-a to a*(C-1))

2005-11-19  Richard Guenther  <rguenther@suse.de>

        PR middle-end/23294
* fold-const.c (fold_plusminus_mult_expr): New function.
(fold_binary): Use to canonicalize PLUS_EXPR and MINUS_EXPR
cases, remove now unnecessary code.

* gcc.dg/tree-ssa/pr23294.c: New testcase.

From-SVN: r107218
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/pr23294.c [new file with mode: 0644]