aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2009-03-28 10:05:24 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2009-03-28 10:05:24 +0000
commit8ca1fd7674f5ffff8d7ab4b9a4909073e7d26da1 (patch)
tree309865ec92e23cd15ca1d8b8dfea9c09dbe4e2c7 /gcc
parenta254e44de7e7f417e3cdff485b27396e6bb16650 (diff)
downloadgcc-8ca1fd7674f5ffff8d7ab4b9a4909073e7d26da1.zip
gcc-8ca1fd7674f5ffff8d7ab4b9a4909073e7d26da1.tar.gz
gcc-8ca1fd7674f5ffff8d7ab4b9a4909073e7d26da1.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/vect/fast-math-pr38968.f9021
-rw-r--r--gcc/tree-vect-analyze.c2
4 files changed, 33 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 738e7db..48715d3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
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
* tree.h (combine_comparisons): Declare.
* fold-const.c (combine_comparisons): Export.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 41e5d70..e0f7df7 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,10 @@
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
* gcc.dg/tree-ssa/ssa-ifcombine-7.c: New testcase.
diff --git a/gcc/testsuite/gfortran.dg/vect/fast-math-pr38968.f90 b/gcc/testsuite/gfortran.dg/vect/fast-math-pr38968.f90
new file mode 100644
index 0000000..e161315
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/vect/fast-math-pr38968.f90
@@ -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" } }
diff --git a/gcc/tree-vect-analyze.c b/gcc/tree-vect-analyze.c
index 0b94714..eb5166b 100644
--- a/gcc/tree-vect-analyze.c
+++ b/gcc/tree-vect-analyze.c
@@ -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))
{