aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2023-11-03 15:53:11 +0100
committerRichard Biener <rguenther@suse.de>2023-11-03 15:55:10 +0100
commite902dfbea7a75affbf645d024ff8c762afd9741e (patch)
tree4967d71d36be815e228fcb90aa6b8c1c41383af3
parent95cfa2cdd1b525a5b2830206692ddb9f948000d3 (diff)
downloadgcc-e902dfbea7a75affbf645d024ff8c762afd9741e.zip
gcc-e902dfbea7a75affbf645d024ff8c762afd9741e.tar.gz
gcc-e902dfbea7a75affbf645d024ff8c762afd9741e.tar.bz2
Testcases for vectorizer peeling
The following exercise otherwise not exercised paths in the vectorizer peeling code, resulting in CPU 2017 build ICEs when patching but no fallout in the testsuite. * gfortran.dg/20231103-1.f90: New testcase. * gfortran.dg/20231103-2.f90: Likewise.
-rw-r--r--gcc/testsuite/gfortran.dg/20231103-1.f9022
-rw-r--r--gcc/testsuite/gfortran.dg/20231103-2.f9022
2 files changed, 44 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/20231103-1.f90 b/gcc/testsuite/gfortran.dg/20231103-1.f90
new file mode 100644
index 0000000..61ccf5c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/20231103-1.f90
@@ -0,0 +1,22 @@
+! { dg-do compile }
+! { dg-options "-Ofast" }
+SUBROUTINE sedi_1D(QX1d, DZ1d,kdir,BX1d,kbot,ktop)
+ real, dimension(:) :: QX1d,DZ1d
+ real, dimension(size(QX1d)) :: VVQ
+ logical BX_present
+ do k= kbot,ktop,kdir
+ VVQ= VV_Q0
+ enddo
+ Vxmaxx= min0
+ if (kdir==1) then
+ dzMIN = minval(DZ1d)
+ endif
+ npassx= Vxmaxx/dzMIN
+ DO nnn= 1,npassx
+ if (BX_present) then
+ do k= ktop,kdir
+ BX1d= iDZ1d0
+ enddo
+ endif
+ ENDDO
+END
diff --git a/gcc/testsuite/gfortran.dg/20231103-2.f90 b/gcc/testsuite/gfortran.dg/20231103-2.f90
new file mode 100644
index 0000000..c510505
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/20231103-2.f90
@@ -0,0 +1,22 @@
+! { dg-do compile }
+! { dg-options "-Ofast" }
+subroutine shr_map_checkFldStrshr_map_mapSet_dest(ndst,max0,eps,sum0,maxval0,min0,nidnjd,renorm)
+ allocatable sum(:)
+ logical renorm
+ allocate(sum(ndst))
+ do n=1,ndst
+ if (sum0 > eps) then
+ rmax = max0
+ endif
+ enddo
+ if (renorm) then
+ rmin = maxval0
+ rmax = minval(sum)
+ do n=1,nidnjd
+ if (sum0 > eps) then
+ rmin = min0
+ endif
+ enddo
+ write(*,*) rmin,rmax
+ endif
+end