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

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

https://gcc.gnu.org/g:c778968339afd140380a46edbade054667c7dce2

commit r11-7936-gc778968339afd140380a46edbade054667c7dce2
Author: Richard Sandiford <richard.sandif...@arm.com>
Date:   Wed Mar 31 19:34:01 2021 +0100

    gimple-fold: Recompute ADDR_EXPR flags after folding a TMR [PR98268]

    The gimple verifier picked up that an ADDR_EXPR of a MEM_REF was not
    marked TREE_CONSTANT even though the address was in fact invariant.
    This came from folding a &TARGET_MEM_REF with constant operands to
    a &MEM_REF; &TARGET_MEM_REF is never treated as TREE_CONSTANT
    but &MEM_REF can be.

    gcc/
            PR tree-optimization/98268
            * gimple-fold.c (maybe_canonicalize_mem_ref_addr): Call
            recompute_tree_invariant_for_addr_expr after successfully
            folding a TARGET_MEM_REF that occurs inside an ADDR_EXPR.

    gcc/testsuite/
            PR tree-optimization/98268
            * gcc.target/aarch64/sve/pr98268-1.c: New test.
            * gcc.target/aarch64/sve/pr98268-2.c: Likewise.

Reply via email to