https://gcc.gnu.org/g:9fad7d8c7bdda850f2c131cf97757d740766d6dd
commit 9fad7d8c7bdda850f2c131cf97757d740766d6dd Author: Jakub Jelinek <ja...@redhat.com> Date: Tue Apr 30 13:11:08 2024 +0200 Revert "vect: Adjust vect_transform_reduction assertion [PR114883]" This reverts commit f7b939b4351d6ea38c58cefcc55c79325912d087. Diff: --- gcc/testsuite/gfortran.dg/pr114883.f90 | 53 ---------------------------------- gcc/tree-vect-loop.cc | 3 +- 2 files changed, 1 insertion(+), 55 deletions(-) diff --git a/gcc/testsuite/gfortran.dg/pr114883.f90 b/gcc/testsuite/gfortran.dg/pr114883.f90 deleted file mode 100644 index 3fec1d278b3..00000000000 --- a/gcc/testsuite/gfortran.dg/pr114883.f90 +++ /dev/null @@ -1,53 +0,0 @@ -! PR tree-optimization/114883 -! { dg-do compile } -! { dg-options "-O2 -fvect-cost-model=cheap" } -! { dg-additional-options "-march=x86-64-v4" { target i?86-*-* x86_64-*-* } } - -subroutine pr114883_1(a, b, c, d, e, f, g, h, o) - real(8) :: c(1011), d(1011), e(0:1011) - real(8) :: p, q, f, r, g(1011), h(1011), b, bar - integer :: o(100), a, t, u - p = 0.0_8 - r = bar() - u = 1 - do i = 1,a - do k = 1,1011 - km1 = max0(k-1,1) - h(k) = c(k) * e(k-1) * d(km1) - f = g(k) + h(k) - if(f.gt.1.e-6)then - p = min(p,r) - endif - end do - q = 0.9_8 * p - t = integer(b/q + 1) - if(t>100)then - u = t - endif - o(u) = o(u) + 1 - end do -end subroutine pr114883_1 -subroutine pr114883_2(a, b, c, d, e, f, g, h, o) - real(8) :: c(1011), d(1011), e(0:1011) - real(8) :: p, q, f, r, g(1011), h(1011), b, bar - integer :: o(100), a, t, u - p = 0.0_8 - r = bar() - u = 1 - do i = 1,a - do k = 1,1011 - km1 = max0(k-1,1) - h(k) = c(k) * e(k-1) * d(km1) - f = g(k) + h(k) - if(f.gt.1.e-6)then - p = max(p,r) - endif - end do - q = 0.9_8 * p - t = integer(b/q + 1) - if(t>100)then - u = t - endif - o(u) = o(u) + 1 - end do -end subroutine pr114883_2 diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc index 6a912f2c2d7..3ffcac8c613 100644 --- a/gcc/tree-vect-loop.cc +++ b/gcc/tree-vect-loop.cc @@ -8504,8 +8504,7 @@ vect_transform_reduction (loop_vec_info loop_vinfo, { gcc_assert (code == IFN_COND_ADD || code == IFN_COND_SUB || code == IFN_COND_MUL || code == IFN_COND_AND - || code == IFN_COND_IOR || code == IFN_COND_XOR - || code == IFN_COND_MIN || code == IFN_COND_MAX); + || code == IFN_COND_IOR || code == IFN_COND_XOR); gcc_assert (op.num_ops == 4 && (op.ops[reduc_index] == op.ops[internal_fn_else_index ((internal_fn) code)]));