public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/38968]  New: Complex matrix product is not vectorized
@ 2009-01-25 16:52 dominiq at lps dot ens dot fr
  2009-01-25 17:33 ` [Bug tree-optimization/38968] " rguenth at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: dominiq at lps dot ens dot fr @ 2009-01-25 16:52 UTC (permalink / raw)
  To: gcc-bugs

As shown by the following code, the complex matrix product is not vectorized,
even with the patch in http://gcc.gnu.org/ml/gcc-patches/2009-01/msg01174.html:

program mymatmul
  implicit none
  integer, parameter :: kp = 4
  integer, parameter :: n = 2000
  real(kp), dimension(n,n) :: rr, ri
  complex(kp), dimension(n,n) :: a,b,c
  real :: t1, t2
  integer :: i, j, k

  call random_number (rr)
  call random_number (ri)
  a = cmplx (rr, ri)
  call random_number (rr)
  call random_number (ri)
  b = cmplx (rr, ri)

  call cpu_time (t1)

  c = cmplx (0._kp, 0._kp)
  do j = 1, n
     do k = 1, n
        do i = 1, n
           c(i,j) = c(i,j) + a(i,k) * b(k,j)
        end do
     end do
  end do

  call cpu_time (t2)
  write (*,'(F8.4)') t2-t1

end program mymatmul

[ibook-dhum] bug/timing% gfc -m64 -O3 -ffast-math -funroll-loops
-fomit-frame-pointer -ftree-vectorizer-verbose=2 mymatmul_v_c4.f90              
mymatmul_v_c4.f90:22: note: not vectorized: can't calculate alignment for data
ref.
mymatmul_v_c4.f90:15: note: not vectorized: complicated access pattern.
mymatmul_v_c4.f90:15: note: not vectorized: can't calculate alignment for data
ref.
mymatmul_v_c4.f90:12: note: not vectorized: complicated access pattern.
mymatmul_v_c4.f90:12: note: not vectorized: can't calculate alignment for data
ref.
mymatmul_v_c4.f90:1: note: vectorized 0 loops in function.

The real corresponding code is vectorized.


-- 
           Summary: Complex matrix product is not vectorized
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dominiq at lps dot ens dot fr
 GCC build triplet: i686-apple-darwin9
  GCC host triplet: i686-apple-darwin9
GCC target triplet: i686-apple-darwin9


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


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

end of thread, other threads:[~2009-03-28 10:06 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-25 16:52 [Bug middle-end/38968] New: Complex matrix product is not vectorized dominiq at lps dot ens dot fr
2009-01-25 17:33 ` [Bug tree-optimization/38968] " rguenth at gcc dot gnu dot org
2009-01-26 11:15 ` rguenth at gcc dot gnu dot org
2009-01-26 13:10 ` irar at il dot ibm dot com
2009-01-26 13:25 ` rguenth at gcc dot gnu dot org
2009-01-26 14:21 ` howarth at nitro dot med dot uc dot edu
2009-01-26 14:23 ` rguenther at suse dot de
2009-02-01 10:37 ` dominiq at lps dot ens dot fr
2009-02-01 10:49 ` rguenth at gcc dot gnu dot org
2009-02-01 10:58 ` dominiq at lps dot ens dot fr
2009-02-01 11:11 ` rguenther at suse dot de
2009-03-28 10:05 ` rguenth at gcc dot gnu dot org
2009-03-28 10:06 ` rguenth 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).