[Bug tree-optimization/101293] LIM ref canonicalization incomplete

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jul 2 11:54:39 GMT 2021


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

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

https://gcc.gnu.org/g:4546f423ecff96f223adfbec4963d2ff17f27c7b

commit r12-1977-g4546f423ecff96f223adfbec4963d2ff17f27c7b
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Jul 2 12:57:06 2021 +0200

    tree-optimization/101293 - further enhance LIMs ref canonicalization

    This makes sure to handle MEM[p + 4] and MEM[p].j with j at offset 4
    as the same ref in store motion.  For hashing we need to be
    more restrictive in what we handle since there's no poly-int
    handlers for inchash.  For comparison we can compare poly_offsets directly.

    2021-07-02  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/101293
            * tree-ssa-loop-im.c (mem_ref_hasher::equal): Compare MEM_REF bases
            with combined offsets.
            (gather_mem_refs_stmt): Hash MEM_REFs as if their offset were
            combined with the rest of the offset.

            * gcc.dg/tree-ssa/ssa-lim-15.c: New testcase.


More information about the Gcc-bugs mailing list