re PR tree-optimization/38968 (Complex matrix product is not vectorized)

2009-03-28  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/38968
	* tree-vect-analyze.c (vect_compute_data_ref_alignment):
	Use FLOOR_MOD_EXPR to compute misalignment.

	* gfortran.dg/vect/fast-math-pr38968.f90: New testcase.

From-SVN: r145171
This commit is contained in:
Richard Guenther 2009-03-28 10:05:24 +00:00 committed by Richard Biener
parent a254e44de7
commit 8ca1fd7674
4 changed files with 33 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2009-03-28 Richard Guenther <rguenther@suse.de>
PR tree-optimization/38968
* tree-vect-analyze.c (vect_compute_data_ref_alignment):
Use FLOOR_MOD_EXPR to compute misalignment.
2009-03-28 Richard Guenther <rguenther@suse.de>
PR tree-optimization/37795

View File

@ -1,3 +1,8 @@
2009-03-28 Richard Guenther <rguenther@suse.de>
PR tree-optimization/38968
* gfortran.dg/vect/fast-math-pr38968.f90: New testcase.
2009-03-28 Richard Guenther <rguenther@suse.de>
PR tree-optimization/37795

View File

@ -0,0 +1,21 @@
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
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
end program mymatmul
! { dg-final { scan-tree-dump "vectorized 1 loops" "vect" } }
! { dg-final { cleanup-tree-dump "vect" } }

View File

@ -1504,7 +1504,7 @@ vect_compute_data_ref_alignment (struct data_reference *dr)
&& DECL_ALIGN (base) >= TYPE_ALIGN (vectype)));
/* Modulo alignment. */
misalign = size_binop (TRUNC_MOD_EXPR, misalign, alignment);
misalign = size_binop (FLOOR_MOD_EXPR, misalign, alignment);
if (!host_integerp (misalign, 1))
{