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

--- Comment #7 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:9b2ad21ab3ebc21a3408108327fa1a7cbedaf217

commit r12-4398-g9b2ad21ab3ebc21a3408108327fa1a7cbedaf217
Author: Richard Biener <rguent...@suse.de>
Date:   Thu Oct 14 09:00:25 2021 +0200

    tree-optimization/102659 - really avoid undef overflow in if-conversion

    This plugs the remaining hole of POINTER_PLUS_EXPR with undefined
    overflow.  Unfortunately we have to go through some lengths to
    not put invariant conversions into the loop body since that confuses
    the vectorizers gather/scatter discovery which relies on identifying
    an invariant component of plus and minus expressions.  We can
    emit those in the loop preheader but then we have to accept that
    being non-empty when looking for the LOOP_VECTORIZED internal
    function call in the vectorizer.

    2021-10-14  Richard Biener  <rguent...@suse.de>

            PR tree-optimization/102659
            * tree-if-conv.c (if_convertible_gimple_assign_stmt_p): Also
            rewrite pointer typed undefined overflow operations.
            (predicate_statements): Likewise.  Make sure to emit invariant
            conversions in the preheader.
            * tree-vectorizer.c (vect_loop_vectorized_call): Look through
            non-empty preheaders.
            * tree-data-ref.c (dr_analyze_indices): Strip useless
            conversions to the MEM_REF base type.

Reply via email to