OSDN Git Service

* fold-const.c (fold <PLUS_EXPR>): Transform x+x into x*2.0.
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 4 Aug 2003 23:42:48 +0000 (23:42 +0000)
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 4 Aug 2003 23:42:48 +0000 (23:42 +0000)
commitcf58ef1d6fbe1a6314a68061ffb09439410751b3
tree9617a20782252283684d9c8639c9ad8e7fbf7873
parentb518d98cdf1091c3dd4cefa5d959b69677197394
* fold-const.c (fold <PLUS_EXPR>): Transform x+x into x*2.0.
Optimize x*c+x and x+x*c into x*(c+1) and x*c1+x*c2 into x*(c1+c2)
for floating point expressions with -ffast-math.
(fold <MULT_EXPR>): Don't transform x*2.0 into x+x.
* expmed.c (expand_mult): Wrap long line.  Expand x*2.0 as x+x.

* gcc.dg/20030804-1.c: New test case.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70158 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/expmed.c
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/20030804-1.c [new file with mode: 0644]