public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/23452] Optimizing CONJG_EXPR (a) * a
       [not found] <bug-23452-10391@http.gcc.gnu.org/bugzilla/>
@ 2006-05-30 21:34 ` sayle at gcc dot gnu dot org
  2006-06-01  2:41 ` roger at eyesopen dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: sayle at gcc dot gnu dot org @ 2006-05-30 21:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from sayle at gcc dot gnu dot org  2006-05-30 21:34 -------
Subject: Bug 23452

Author: sayle
Date: Tue May 30 21:34:04 2006
New Revision: 114246

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114246
Log:

        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.


Added:
    trunk/gcc/testsuite/gcc.dg/fold-mulconj-1.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/fold-const.c
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23452


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tree-optimization/23452] Optimizing CONJG_EXPR (a) * a
       [not found] <bug-23452-10391@http.gcc.gnu.org/bugzilla/>
  2006-05-30 21:34 ` [Bug tree-optimization/23452] Optimizing CONJG_EXPR (a) * a sayle at gcc dot gnu dot org
@ 2006-06-01  2:41 ` roger at eyesopen dot com
  2006-06-01 19:13 ` tkoenig at gcc dot gnu dot org
  2006-11-01  4:31 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: roger at eyesopen dot com @ 2006-06-01  2:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from roger at eyesopen dot com  2006-06-01 02:41 -------
This is now fixed on mainline provided the user specifies -ffast-math.
There are some complications where imagpart(z*~z) can be non-zero, if
imagpart(z) is non-finite, such as an Inf or a NaN.  It's unclear from
the fortran-95 standard whether gfortran is allowed to optimize this
even without -ffast-math.


-- 

roger at eyesopen dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.2.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23452


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tree-optimization/23452] Optimizing CONJG_EXPR (a) * a
       [not found] <bug-23452-10391@http.gcc.gnu.org/bugzilla/>
  2006-05-30 21:34 ` [Bug tree-optimization/23452] Optimizing CONJG_EXPR (a) * a sayle at gcc dot gnu dot org
  2006-06-01  2:41 ` roger at eyesopen dot com
@ 2006-06-01 19:13 ` tkoenig at gcc dot gnu dot org
  2006-11-01  4:31 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2006-06-01 19:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from tkoenig at gcc dot gnu dot org  2006-06-01 19:13 -------
(In reply to comment #3)
> This is now fixed on mainline provided the user specifies -ffast-math.
> There are some complications where imagpart(z*~z) can be non-zero, if
> imagpart(z) is non-finite, such as an Inf or a NaN.  It's unclear from
> the fortran-95 standard whether gfortran is allowed to optimize this
> even without -ffast-math.

I'll ask con comp.lang.fortran :-)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23452


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tree-optimization/23452] Optimizing CONJG_EXPR (a) * a
       [not found] <bug-23452-10391@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2006-06-01 19:13 ` tkoenig at gcc dot gnu dot org
@ 2006-11-01  4:31 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-11-01  4:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pinskia at gcc dot gnu dot org  2006-11-01 04:30 -------
(In reply to comment #3)
> This is now fixed on mainline provided the user specifies -ffast-math.
> There are some complications where imagpart(z*~z) can be non-zero, if
> imagpart(z) is non-finite, such as an Inf or a NaN.  It's unclear from
> the fortran-95 standard whether gfortran is allowed to optimize this
> even without -ffast-math.

Well Fortran 95 does not have non-finite except with a TR and the IEEE fp
types, I forgot the number and the name


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23452


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tree-optimization/23452] Optimizing CONJG_EXPR (a) * a
  2005-08-18  7:26 [Bug tree-optimization/23452] New: " tkoenig at gcc dot gnu dot org
@ 2005-08-18 23:51 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-18 23:51 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-18 23:33 -------
Confirmed, there are two ways of fixing this, one in fold which folds CONJ_EXPR<a>*a, the other way is 
to do it later on via somthing like like a combiner or even in complex exand.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-08-18 23:33:48
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23452


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-11-01  4:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-23452-10391@http.gcc.gnu.org/bugzilla/>
2006-05-30 21:34 ` [Bug tree-optimization/23452] Optimizing CONJG_EXPR (a) * a sayle at gcc dot gnu dot org
2006-06-01  2:41 ` roger at eyesopen dot com
2006-06-01 19:13 ` tkoenig at gcc dot gnu dot org
2006-11-01  4:31 ` pinskia at gcc dot gnu dot org
2005-08-18  7:26 [Bug tree-optimization/23452] New: " tkoenig at gcc dot gnu dot org
2005-08-18 23:51 ` [Bug tree-optimization/23452] " pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).