This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch, vectorizer] Fix PR tree-optimization/48765



gcc-patches-owner@gcc.gnu.org wrote on 28/04/2011 03:42:01 PM:

>
>
> Hi,
>
> Sometimes loop vectorization factor changes during the analysis, while
> statement analysis depends on it. This patch moves the update of the
> vectorization before statements, avoiding current difference between the
> analysis and the transformations phases that caused the problem described
> in the PR.
>
> Bootstrapped and now testing on powerpc64-suse-linux.
> I'll commit the patch once the testing completes.
>

I ended up committing a slightly different version of the patch that scans
the loop statements only if we decided to use SLP.

Bootstrapped and tested on powerpc64-suse-linux.
Committed revision 173132.

Ira

ChangeLog:

        PR tree-optimization/48765
        * tree-vectorizer.h (vect_make_slp_decision): Return bool.
        * tree-vect-loop.c (vect_analyze_loop_operations): Add new argument
        to indicate if loop aware SLP is being used.  Scan the statements
        and update the vectorization factor according to the type of
        vectorization before statement analysis.
        (vect_analyze_loop_2): Get a return value from
vect_make_slp_decision,
        pass it to vect_analyze_loop_operations.
        (vectorizable_reduction): Set number of copies to 1 in case of pure
        SLP statement.
        * tree-vect-stmts.c (vectorizable_conversion,
        vectorizable_assignment, vectorizable_shift,
        vectorizable_operation, vectorizable_type_demotion,
        vectorizable_type_promotion, vectorizable_store,
vectorizable_load):
        Likewise.
        (vectorizable_condition): Move the check that it is not SLP
        vectorization before the number of copies check.
        * tree-vect-slp.c (vect_make_slp_decision): Return TRUE if decided
        to vectorize the loop using SLP.


testsuite/ChangeLog:

        PR tree-optimization/48765
        * gcc.dg/vect/pr48765.c: New.

(See attached file: pr48765.txt)

Attachment: pr48765.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]