OSDN Git Service

PR tree-optimization/23452
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 30 May 2006 21:34:04 +0000 (21:34 +0000)
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 30 May 2006 21:34:04 +0000 (21:34 +0000)
commit5f4f36179fad688358074cd9dd9cd0461168334a
treee8c7d9474db25736fdee60d42de43372bd6ae36e
parentf5ecb8bdad7d1c93386fd9bfd6669cf0f51550b4
PR tree-optimization/23452
* fold-const.c (fold_mult_zconjz): New subroutine of fold_binary,
to optimize z * conj(z) as realpart(z)^2 + imagpart(z)^2.
(fold_binary) <MULT_EXPR>: Call fold_mult_zconjz for integral
complex values and with -ffast-math for FP complex values.

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

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