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

--- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>:

https://gcc.gnu.org/g:5b6788ae5a365aecd6776f563e44022acb93a57a

commit r12-6737-g5b6788ae5a365aecd6776f563e44022acb93a57a
Author: Richard Biener <rguent...@suse.de>
Date:   Wed Jan 19 12:31:30 2022 +0100

    tree-optimization/104112 - add check for vect epilogue reduc reuse

    This adds a missing check for the availability of intermediate vector
    types required to re-use the accumulator of a vectorized reduction
    in the vectorized epilogue.  For SVE and VNx2DF vs V2DF with
    -msve-vector-bits=512 for example V4DF is not available.

    In addition to that we have to verify the reduction operation is
    supported, otherwise we for example on i?86 get vector code that's
    later decomposed again by vector lowering when trying to use
    a V2HI epilogue for a V8HI reduction with a target without
    TARGET_MMX_WITH_SSE.

    It might be we want -Wvector-operation-performance for all vect.exp
    tests but that seems to have existing regressions.

    2022-01-19  Richard Biener  <rguent...@suse.de>

            PR tree-optimization/104112
            * tree-vect-loop.cc (vect_find_reusable_accumulator): Check
            for required intermediate vector types.

            * gcc.dg/vect/pr104112-1.c: New testcase.
            * gcc.dg/vect/pr104112-2.c: New testcase.

Reply via email to