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

--- Comment #19 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:d1c072a1c3411a6fe29900750b38210af8451eeb

commit r14-2821-gd1c072a1c3411a6fe29900750b38210af8451eeb
Author: Richard Biener <rguent...@suse.de>
Date:   Thu Jul 27 13:08:32 2023 +0200

    tree-optimization/91838 - fix FAIL of g++.dg/opt/pr91838.C

    The following fixes the lack of simplification of a vector shift
    by an out-of-bounds shift value.  For scalars this is done both
    by CCP and VRP but vectors are not handled there.  This results
    in PR91838 differences in outcome dependent on whether a vector
    shift ISA is available and thus vector lowering does or does not
    expose scalar shifts here.

    The following adds a match.pd pattern to catch uniform out-of-bound
    shifts, simplifying them to zero when not sanitizing shift amounts.

            PR tree-optimization/91838
            * gimple-match-head.cc: Include attribs.h and asan.h.
            * generic-match-head.cc: Likewise.
            * match.pd (([rl]shift @0 out-of-bounds) -> zero): New pattern.

Reply via email to