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

--- Comment #10 from GCC 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:b8ea13ebf1211714503fd72f25c04376483bfa53

commit r15-3036-gb8ea13ebf1211714503fd72f25c04376483bfa53
Author: Richard Biener <rguent...@suse.de>
Date:   Thu Aug 8 11:36:43 2024 +0200

    tree-optimization/116274 - overzealous SLP vectorization

    The following tries to address that the vectorizer fails to have
    precise knowledge of argument and return calling conventions and
    views some accesses as loads and stores that are not.
    This is mainly important when doing basic-block vectorization as
    otherwise loop indexing would force such arguments to memory.

    On x86 the reduction in the number of apparent loads and stores
    often dominates cost analysis so the following tries to mitigate
    this aggressively by adjusting only the scalar load and store
    cost, reducing them to the cost of a simple scalar statement,
    but not touching the vector access cost which would be much
    harder to estimate.  Thereby we error on the side of not performing
    basic-block vectorization.

            PR tree-optimization/116274
            * tree-vect-slp.cc (vect_bb_slp_scalar_cost): Cost scalar loads
            and stores as simple scalar stmts when they access a non-global,
            not address-taken variable that doesn't have BLKmode assigned.

            * gcc.target/i386/pr116274-2.c: New testcase.

Reply via email to