On Linux/x86-64, revision 185738 gave gfortran -c -o mp2ddi.fppized.o -O3 -funroll-loops -ffast-math -ffixed-form mp2ddi.fppized.f ... Warning: Type mismatch in argument 'ix' at (1); passed REAL(8) to INTEGER(4) mp2grd.fppized.f:5241.47: CALL TRFRD(NFT15,XINB(1,NMU,MI),NX,PHFA,NIX,NBF2) 1 Warning: Type mismatch in argument 'ix' at (1); passed REAL(8) to INTEGER(4) mp2ddi.fppized.f: In function 'wp': mp2ddi.fppized.f:2597:0: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Revision 185629 is OK.
I don't have access to the SPEC sources. Do you have a reduced test case?
(In reply to comment #0) > On Linux/x86-64, revision 185738 gave > Revision 185629 is OK. Don't think that the regression is caused or triggered by the Fortran front end. The last real change was 185517 and 185728 removed only an unused macro. Thus, the bug should be caused - or at least triggered - by some ME change. Hence, I have now assigned it to middle-end. (Besides, most gfortran developers do not have access to SPEC CPU.)
Reduced testcase: function pr52701 (x, z, e, f, g, l) integer a, b, c, d, e, f, g, i, j, l, pr52701 double precision x(e), z(e*e) do i = l, f do j = l, i d = 0 do a = 1, g c = a - g do b = 1, g d = d + 1 c = c + g z(d) = z(d) / (x(i) + x(j) - x(f + a) - x(f + b)) end do end do end do end do pr52701 = c end
Mine.
During analysis we have {c_50, +, pretmp.51_172}_4 as access function. This is analyzed to be unknown: 9: Unknown def-use cycle pattern. but we still vectorize this loop, as the induction (with unknown step, thus not detected as such) is irrelevant, only the final value after the loop (thus, a missed SCEV "const"-prop). Which means we should simply always set STMT_VINFO_LOOP_PHI_EVOLUTION_PART. I have a patch.
Author: rguenth Date: Mon Mar 26 14:14:51 2012 New Revision: 185800 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185800 Log: 2012-03-26 Richard Guenther <rguenther@suse.de> PR tree-optimization/52701 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Always compute and set the evolution part of PHI nodes. * gfortran.dg/pr52701.f90: New testcase. Added: trunk/gcc/testsuite/gfortran.dg/pr52701.f90 Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-vect-loop.c
Fixed.
Author: rguenth Date: Tue Apr 3 11:55:24 2012 New Revision: 186105 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186105 Log: 2012-04-03 Richard Guenther <rguenther@suse.de> Backport from mainline 2012-03-06 Richard Guenther <rguenther@suse.de> PR middle-end/52493 * tree-ssa-alias.c (ptr_derefs_may_alias_p): Robustify. * gcc.dg/torture/pr52493.c: New testcase. 2012-03-23 Richard Guenther <rguenther@suse.de> PR tree-optimization/52678 * tree-vectorizer.h (struct _stmt_vec_info): Add loop_phi_evolution_part member. (STMT_VINFO_LOOP_PHI_EVOLUTION_PART): New define. * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Initialize STMT_VINFO_LOOP_PHI_EVOLUTION_PART. * tree-vect-loop-manip.c (vect_update_ivs_after_vectorizer): Use the cached evolution part and the PHI nodes value from the loop preheader edge instead of re-analyzing the evolution. * gfortran.dg/pr52678.f: New testcase. 2012-03-26 Richard Guenther <rguenther@suse.de> PR tree-optimization/52701 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Always compute and set the evolution part of PHI nodes. * gfortran.dg/pr52701.f90: New testcase. 2012-03-30 Richard Guenther <rguenther@suse.de> PR tree-optimization/52754 * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Only propagate arbitrary addresses into really plain dereferences. * gcc.target/i386/pr52754.c: New testcase. Added: branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/torture/pr52493.c branches/gcc-4_7-branch/gcc/testsuite/gcc.target/i386/pr52754.c branches/gcc-4_7-branch/gcc/testsuite/gfortran.dg/pr52678.f branches/gcc-4_7-branch/gcc/testsuite/gfortran.dg/pr52701.f90 Modified: branches/gcc-4_7-branch/gcc/ChangeLog branches/gcc-4_7-branch/gcc/testsuite/ChangeLog branches/gcc-4_7-branch/gcc/tree-ssa-alias.c branches/gcc-4_7-branch/gcc/tree-ssa-forwprop.c branches/gcc-4_7-branch/gcc/tree-vect-loop-manip.c branches/gcc-4_7-branch/gcc/tree-vect-loop.c branches/gcc-4_7-branch/gcc/tree-vectorizer.h