public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/22572] New: Double occurrence of matmul intrinsic not optimised
@ 2005-07-20 17:50 schnetter at aei dot mpg dot de
  2005-07-20 17:54 ` [Bug fortran/22572] " schnetter at aei dot mpg dot de
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: schnetter at aei dot mpg dot de @ 2005-07-20 17:50 UTC (permalink / raw)
  To: gcc-bugs

GNU Fortran 95 (GCC 4.1.0 20050715 (experimental)), when run with the options  
-Wall -O3 -march=pentium4 -S, optimises one of the two calls to the sin  
intrinsic away in the following function:  
  
function optsin (x)  
  implicit none  
  double precision :: optsin  
  double precision, intent(in) :: x  
  optsin = sin(x) / (1 + sin(x))  
end function optsin  
  
In the "equivalent" function  
  
function optmatmul (a, b, ni, nj)  
  implicit none  
  integer, intent(in) :: ni, nj  
  double precision :: optmatmul(ni, nj)  
  double precision, intent(in) :: a(ni, nj), b(ni, nj)  
  optmatmul = matmul(a, b) / (1 + matmul(a, b))  
end function optmatmul  
  
the two calls to matmul both remain present in the assembler output, although  
they are known to return the same result.

-- 
           Summary: Double occurrence of matmul intrinsic not optimised
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: schnetter at aei dot mpg dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

* [Bug fortran/22572] Double occurrence of matmul intrinsic not optimised
  2005-07-20 17:50 [Bug fortran/22572] New: Double occurrence of matmul intrinsic not optimised schnetter at aei dot mpg dot de
@ 2005-07-20 17:54 ` schnetter at aei dot mpg dot de
  2005-07-20 18:02 ` pinskia at gcc dot gnu dot org
  2005-07-21  5:12 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: schnetter at aei dot mpg dot de @ 2005-07-20 17:54 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement


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


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

* [Bug fortran/22572] Double occurrence of matmul intrinsic not optimised
  2005-07-20 17:50 [Bug fortran/22572] New: Double occurrence of matmul intrinsic not optimised schnetter at aei dot mpg dot de
  2005-07-20 17:54 ` [Bug fortran/22572] " schnetter at aei dot mpg dot de
@ 2005-07-20 18:02 ` pinskia at gcc dot gnu dot org
  2005-07-21  5:12 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-20 18:02 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization


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


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

* [Bug fortran/22572] Double occurrence of matmul intrinsic not optimised
  2005-07-20 17:50 [Bug fortran/22572] New: Double occurrence of matmul intrinsic not optimised schnetter at aei dot mpg dot de
  2005-07-20 17:54 ` [Bug fortran/22572] " schnetter at aei dot mpg dot de
  2005-07-20 18:02 ` pinskia at gcc dot gnu dot org
@ 2005-07-21  5:12 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-21  5:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-21 05:08 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-07-21 05:08:29
               date|                            |


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


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

end of thread, other threads:[~2005-07-21  5:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-20 17:50 [Bug fortran/22572] New: Double occurrence of matmul intrinsic not optimised schnetter at aei dot mpg dot de
2005-07-20 17:54 ` [Bug fortran/22572] " schnetter at aei dot mpg dot de
2005-07-20 18:02 ` pinskia at gcc dot gnu dot org
2005-07-21  5:12 ` 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).