https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108608

fengfei.xi at horizon dot auto changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fengfei.xi at horizon dot auto

--- Comment #11 from fengfei.xi at horizon dot auto ---
(In reply to GCC Commits from comment #9)
> The releases/gcc-12 branch has been updated by Richard Sandiford
> <rsand...@gcc.gnu.org>:
> 
> https://gcc.gnu.org/g:65216cd44b8c89640ad987b6227ea1d748456a41
> 
> commit r12-9381-g65216cd44b8c89640ad987b6227ea1d748456a41
> Author: Richard Sandiford <richard.sandif...@arm.com>
> Date:   Mon Apr 3 09:57:07 2023 +0100
> 
>     vect: Fix single def-use cycle for ifn reductions [PR108608]
>     
>     The patch that added support for fmin/fmax reductions didn't
>     handle single def-use cycles.  In some ways, this seems like
>     going out of our way to make things slower, but that's a
>     discussion for another day.
>     

Hi Richard

Thanks for your patch, I tested it on gcc-12-2 of debian12 OS and it solved the
problem.

Since my understanding of GCC optimization is limited.
could you please explain under what specific circumstances this change might
lead to slower performance?
Also, is there a more complete fix or any plans for further optimization?

Best regards,
Fengfei.Xi

>     gcc/
>             PR tree-optimization/108608
>             * tree-vect-loop.cc (vect_transform_reduction): Handle single
>             def-use cycles that involve function calls rather than tree
> codes.
>     
>     gcc/testsuite/
>             PR tree-optimization/108608
>             * gcc.dg/vect/pr108608.c: New test.
>             * gcc.target/aarch64/sve/pr108608-1.c: Likewise.
>     
>     (cherry picked from commit 2bb444787ed17a9e786f544cdf51ee2ac6779ab2)

Reply via email to