re PR middle-end/52580 (171.swim performance drop on x86 – vectorization doesn’t happen anymore)
2012-03-15 Richard Guenther <rguenther@suse.de> PR middle-end/52580 * tree-data-ref.c (subscript_dependence_tester_1): Check all dimensions for non-conflicting access functions. * gfortran.dg/vect/pr52580.f: New testcase. From-SVN: r185426
This commit is contained in:
parent
a12bf40281
commit
9b00587cc2
|
@ -1,3 +1,9 @@
|
|||
2012-03-15 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/52580
|
||||
* tree-data-ref.c (subscript_dependence_tester_1): Check
|
||||
all dimensions for non-conflicting access functions.
|
||||
|
||||
2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
|
||||
|
||||
PR c++/44783
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2012-03-15 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/52580
|
||||
* gfortran.dg/vect/pr52580.f: New testcase.
|
||||
|
||||
2012-03-15 Oleg Endo <olegendo@gcc.gnu.org>
|
||||
|
||||
* gcc.target/sh/fpul-usage-1.c: New.
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
! { dg-do compile }
|
||||
! { dg-require-effective-target vect_double }
|
||||
SUBROUTINE CALC2
|
||||
IMPLICIT REAL*8 (A-H, O-Z)
|
||||
PARAMETER (N1=1335, N2=1335)
|
||||
|
||||
COMMON U(N1,N2), V(N1,N2), P(N1,N2),
|
||||
* UNEW(N1,N2), VNEW(N1,N2),
|
||||
1 PNEW(N1,N2), UOLD(N1,N2),
|
||||
* VOLD(N1,N2), POLD(N1,N2),
|
||||
2 CU(N1,N2), CV(N1,N2),
|
||||
* Z(N1,N2), H(N1,N2), PSI(N1,N2)
|
||||
COMMON /CONS/ DT,TDT,DX,DY,A,ALPHA,ITMAX,MPRINT,M,N,MP1,
|
||||
1 NP1,EL,PI,TPI,DI,DJ,PCF
|
||||
TDTS8 = TDT/8.D0
|
||||
TDTSDX = TDT/DX
|
||||
TDTSDY = TDT/DY
|
||||
|
||||
DO 200 J=1,N
|
||||
DO 200 I=1,M
|
||||
UNEW(I+1,J) = UOLD(I+1,J)+
|
||||
1 TDTS8*(Z(I+1,J+1)+Z(I+1,J))*(CV(I+1,J+1)+CV(I,J+1)+CV(I,J)
|
||||
2 +CV(I+1,J))-TDTSDX*(H(I+1,J)-H(I,J))
|
||||
VNEW(I,J+1) = VOLD(I,J+1)-TDTS8*(Z(I+1,J+1)+Z(I,J+1))
|
||||
1 *(CU(I+1,J+1)+CU(I,J+1)+CU(I,J)+CU(I+1,J))
|
||||
2 -TDTSDY*(H(I,J+1)-H(I,J))
|
||||
PNEW(I,J) = POLD(I,J)-TDTSDX*(CU(I+1,J)-CU(I,J))
|
||||
1 -TDTSDY*(CV(I,J+1)-CV(I,J))
|
||||
200 CONTINUE
|
||||
RETURN
|
||||
END
|
||||
! { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 1 "vect" } }
|
||||
! { dg-final { cleanup-tree-dump "vect" } }
|
|
@ -3460,6 +3460,7 @@ subscript_dependence_tester_1 (struct data_dependence_relation *ddr,
|
|||
unsigned int i;
|
||||
tree last_conflicts;
|
||||
struct subscript *subscript;
|
||||
tree res = NULL_TREE;
|
||||
|
||||
for (i = 0; VEC_iterate (subscript_p, DDR_SUBSCRIPTS (ddr), i, subscript);
|
||||
i++)
|
||||
|
@ -3471,40 +3472,43 @@ subscript_dependence_tester_1 (struct data_dependence_relation *ddr,
|
|||
&overlaps_a, &overlaps_b,
|
||||
&last_conflicts, loop_nest);
|
||||
|
||||
if (SUB_CONFLICTS_IN_A (subscript))
|
||||
free_conflict_function (SUB_CONFLICTS_IN_A (subscript));
|
||||
if (SUB_CONFLICTS_IN_B (subscript))
|
||||
free_conflict_function (SUB_CONFLICTS_IN_B (subscript));
|
||||
|
||||
SUB_CONFLICTS_IN_A (subscript) = overlaps_a;
|
||||
SUB_CONFLICTS_IN_B (subscript) = overlaps_b;
|
||||
SUB_LAST_CONFLICT (subscript) = last_conflicts;
|
||||
|
||||
/* If there is any undetermined conflict function we have to
|
||||
give a conservative answer in case we cannot prove that
|
||||
no dependence exists when analyzing another subscript. */
|
||||
if (CF_NOT_KNOWN_P (overlaps_a)
|
||||
|| CF_NOT_KNOWN_P (overlaps_b))
|
||||
{
|
||||
finalize_ddr_dependent (ddr, chrec_dont_know);
|
||||
dependence_stats.num_dependence_undetermined++;
|
||||
free_conflict_function (overlaps_a);
|
||||
free_conflict_function (overlaps_b);
|
||||
return false;
|
||||
res = chrec_dont_know;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* When there is a subscript with no dependence we can stop. */
|
||||
else if (CF_NO_DEPENDENCE_P (overlaps_a)
|
||||
|| CF_NO_DEPENDENCE_P (overlaps_b))
|
||||
{
|
||||
finalize_ddr_dependent (ddr, chrec_known);
|
||||
dependence_stats.num_dependence_independent++;
|
||||
free_conflict_function (overlaps_a);
|
||||
free_conflict_function (overlaps_b);
|
||||
return false;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if (SUB_CONFLICTS_IN_A (subscript))
|
||||
free_conflict_function (SUB_CONFLICTS_IN_A (subscript));
|
||||
if (SUB_CONFLICTS_IN_B (subscript))
|
||||
free_conflict_function (SUB_CONFLICTS_IN_B (subscript));
|
||||
|
||||
SUB_CONFLICTS_IN_A (subscript) = overlaps_a;
|
||||
SUB_CONFLICTS_IN_B (subscript) = overlaps_b;
|
||||
SUB_LAST_CONFLICT (subscript) = last_conflicts;
|
||||
res = chrec_known;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
if (res == NULL_TREE)
|
||||
return true;
|
||||
|
||||
if (res == chrec_known)
|
||||
dependence_stats.num_dependence_independent++;
|
||||
else
|
||||
dependence_stats.num_dependence_undetermined++;
|
||||
finalize_ddr_dependent (ddr, res);
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Computes the conflicting iterations in LOOP_NEST, and initialize DDR. */
|
||||
|
|
Loading…
Reference in New Issue