This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][GRAPHITE] Test for code generation errors
uOn Tue, 3 Oct 2017, Rainer Orth wrote:
> Hi Richard,
>
> > What ISL Versions are affected?
>
> it's 0.18.
>
> >>Besides, there's
> >>
> >>+UNRESOLVED: gfortran.dg/graphite/pr42393-1.f90 -O
> >>scan-tree-dump-times graphite "code generation error" 1
> >>
> >>for both 32 and 64-bit. The log indicates
> >>
> >>gfortran.dg/graphite/pr42393-1.f90 -O : dump file does not exist
> >>
> >>and indeed the test lacks -fdump-tree-graphite-details contrary to
> >>ChangeLog.
> >
> > Oops, I must have missed that one. Will fix tomorrow.
>
> Fine, thanks.
Fixed as follows, tested on x86_64-unknown-linux-gnu.
Richard.
2017-10-04 Richard Biener <rguenther@suse.de>
* gfortran.dg/graphite/id-17.f: For ilp32 allow graphite codegen
errors and scan for one.
* gfortran.dg/graphite/id-19.f: Likewise.
* gfortran.dg/graphite/pr29832.f90: Likewise.
* gfortran.dg/graphite/pr42326-1.f90: Likewise.
* gfortran.dg/graphite/pr42326.f90: Likewise.
* gfortran.dg/graphite/pr68550-2.f90: Likewise.
* gfortran.dg/graphite/run-id-2.f90: Likewise.
* gfortran.dg/graphite/run-id-3.f90: Likewise.
* gfortran.dg/graphite/pr42393-1.f90: Dump graphite.
Index: gcc/testsuite/gfortran.dg/graphite/id-17.f
===================================================================
--- gcc/testsuite/gfortran.dg/graphite/id-17.f (revision 253393)
+++ gcc/testsuite/gfortran.dg/graphite/id-17.f (working copy)
@@ -1,3 +1,4 @@
+! { dg-additional-options "-fdump-tree-graphite-details --param graphite-allow-codegen-errors=1" { target ilp32 } }
SUBROUTINE SPECTOP(Dr,N)
DIMENSION d1(0:32,0:32) , Dr(0:32,0:32) , x(0:32)
DO k = 0 , N
@@ -14,3 +15,4 @@
ENDDO
ENDDO
END
+! { dg-final { scan-tree-dump-times "code generation error" 1 " graphite" { target ilp32 } } }
Index: gcc/testsuite/gfortran.dg/graphite/id-19.f
===================================================================
--- gcc/testsuite/gfortran.dg/graphite/id-19.f (revision 253393)
+++ gcc/testsuite/gfortran.dg/graphite/id-19.f (working copy)
@@ -1,3 +1,4 @@
+! { dg-additional-options "-fdump-tree-graphite-details --param graphite-allow-codegen-errors=1" { target ilp32 } }
SUBROUTINE ECCODR(FPQR)
DIMENSION FPQR(25,25,25)
INTEGER P,Q,R
@@ -13,3 +14,4 @@
140 QM2= QM2+TWO
150 PM2= PM2+TWO
END
+! { dg-final { scan-tree-dump-times "code generation error" 1 " graphite" { target ilp32 } } }
Index: gcc/testsuite/gfortran.dg/graphite/pr29832.f90
===================================================================
--- gcc/testsuite/gfortran.dg/graphite/pr29832.f90 (revision 253393)
+++ gcc/testsuite/gfortran.dg/graphite/pr29832.f90 (working copy)
@@ -1,5 +1,6 @@
! { dg-do run }
! { dg-options "-O2 -ftree-loop-linear" }
+! { dg-additional-options "-fdump-tree-graphite-details --param graphite-allow-codegen-errors=1" { target ilp32 } }
! Program to test the scalarizer
program testarray
@@ -24,3 +25,4 @@ program testarray
end do
end program
+! { dg-final { scan-tree-dump-times "code generation error" 1 " graphite" { target ilp32 } } }
Index: gcc/testsuite/gfortran.dg/graphite/pr42326-1.f90
===================================================================
--- gcc/testsuite/gfortran.dg/graphite/pr42326-1.f90 (revision 253393)
+++ gcc/testsuite/gfortran.dg/graphite/pr42326-1.f90 (working copy)
@@ -1,7 +1,7 @@
! { dg-do compile { target i?86-*-* x86_64-*-* } }
! { dg-require-effective-target ilp32 }
! { dg-require-effective-target sse2 }
-! { dg-options "-O2 -floop-parallelize-all -fprefetch-loop-arrays -msse2" }
+! { dg-options "-O2 -floop-parallelize-all -fprefetch-loop-arrays -msse2 -fdump-tree-graphite-details --param graphite-allow-codegen-errors=1" }
subroutine phasad(t,i,ium)
implicit none
@@ -17,3 +17,4 @@ subroutine phasad(t,i,ium)
return
end subroutine phasad
+! { dg-final { scan-tree-dump-times "code generation error" 1 " graphite" } }
Index: gcc/testsuite/gfortran.dg/graphite/pr42326.f90
===================================================================
--- gcc/testsuite/gfortran.dg/graphite/pr42326.f90 (revision 253393)
+++ gcc/testsuite/gfortran.dg/graphite/pr42326.f90 (working copy)
@@ -1,7 +1,7 @@
! { dg-do compile { target i?86-*-* x86_64-*-* } }
! { dg-require-effective-target ilp32 }
! { dg-require-effective-target sse2 }
-! { dg-options "-O2 -floop-strip-mine -fprefetch-loop-arrays -msse2" }
+! { dg-options "-O2 -floop-strip-mine -fprefetch-loop-arrays -msse2 -fdump-tree-graphite-details --param graphite-allow-codegen-errors=1" }
subroutine blts ( ldmx, ldmy, v, tmp1, i, j, k)
implicit none
@@ -34,3 +34,4 @@ subroutine phasad(t,i,ium)
return
end subroutine phasad
+! { dg-final { scan-tree-dump-times "code generation error" 1 " graphite" } }
Index: gcc/testsuite/gfortran.dg/graphite/pr42393-1.f90
===================================================================
--- gcc/testsuite/gfortran.dg/graphite/pr42393-1.f90 (revision 253393)
+++ gcc/testsuite/gfortran.dg/graphite/pr42393-1.f90 (working copy)
@@ -1,4 +1,4 @@
-! { dg-options "-O2 -fgraphite-identity -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine --param graphite-allow-codegen-errors=1" }
+! { dg-options "-O2 -fgraphite-identity -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine -fdump-tree-graphite-details --param graphite-allow-codegen-errors=1" }
MODULE beta_gamma_psi
INTEGER, PARAMETER :: dp=KIND(0.0D0)
Index: gcc/testsuite/gfortran.dg/graphite/pr68550-2.f90
===================================================================
--- gcc/testsuite/gfortran.dg/graphite/pr68550-2.f90 (revision 253393)
+++ gcc/testsuite/gfortran.dg/graphite/pr68550-2.f90 (working copy)
@@ -1,5 +1,6 @@
! { dg-do compile }
! { dg-options "-floop-nest-optimize -fcheck=bounds -O1" }
+! { dg-additional-options "-fdump-tree-graphite-details --param graphite-allow-codegen-errors=1" { target ilp32 } }
SUBROUTINE PD2VAL(RES,NDERIV,TG1,TG2,C0)
INTEGER, PARAMETER :: dp=8
@@ -12,3 +13,5 @@ SUBROUTINE PD2VAL(RES,NDERIV,TG1,TG2,C0)
RES(K)=RES(K)+DOT_PRODUCT(T1(0:3),C0(96:99,K))*T2(10)
ENDDO
END SUBROUTINE PD2VAL
+
+! { dg-final { scan-tree-dump-times "code generation error" 1 " graphite" { target ilp32 } } }
Index: gcc/testsuite/gfortran.dg/graphite/run-id-2.f90
===================================================================
--- gcc/testsuite/gfortran.dg/graphite/run-id-2.f90 (revision 253393)
+++ gcc/testsuite/gfortran.dg/graphite/run-id-2.f90 (working copy)
@@ -1,3 +1,4 @@
+! { dg-additional-options "-fdump-tree-graphite-details --param graphite-allow-codegen-errors=1" { target ilp32 } }
IMPLICIT NONE
INTEGER, PARAMETER :: dp=KIND(0.0D0)
REAL(KIND=dp) :: res
@@ -64,3 +65,4 @@ CONTAINS
END FUNCTION exp_radius_very_extended
END
+! { dg-final { scan-tree-dump-times "code generation error" 1 " graphite" { target ilp32 } } }
Index: gcc/testsuite/gfortran.dg/graphite/run-id-3.f90
===================================================================
--- gcc/testsuite/gfortran.dg/graphite/run-id-3.f90 (revision 253393)
+++ gcc/testsuite/gfortran.dg/graphite/run-id-3.f90 (working copy)
@@ -1,5 +1,6 @@
! { dg-do run }
! { dg-options "-ffrontend-optimize -floop-nest-optimize" }
+! { dg-additional-options "-fdump-tree-graphite-details --param graphite-allow-codegen-errors=1" { target ilp32 } }
! PR 56872 - wrong front-end optimization with a single constructor.
! Original bug report by Rich Townsend.
integer :: k
@@ -10,3 +11,4 @@
res = SUM([(s**(REAL(k-1)/REAL(m-1)),k=1,m)])
if (abs(res - 5.84732246) > 1e-6) call abort
end
+! { dg-final { scan-tree-dump-times "code generation error" 1 " graphite" { target ilp32 } } }