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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>:

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

commit r10-6502-gc006911de91ca9e23d7d2df069499c768d215eac
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Fri Feb 7 11:09:03 2020 +0100

    powerpc: Fix -fstack-clash-protection -mprefixed-addr ICE [PR93122]

    As mentioned in the PR, the following testcase ICEs because rs, while valid
    add_operand is not valid add_cint_operand and so gen_add3_insn fails,
    because it doesn't meet the expander predicates.

    Here is what I meant as the alternative, i.e. don't check any predicates,
    just gen_add3_insn, if that fails, force rs into register and retry.
    And, add REG_FRAME_RELATED_EXPR note always when we haven't emitted a
single
    insn that has rtl exactly matching what we'd add the REG_FRAME_RELATED_EXPR
    with (in that case, dwarf2cfi.c is able to figure it out by itself, no need
    to waste compile time memory).

    2020-02-07  Jakub Jelinek  <ja...@redhat.com>

        PR target/93122
        * config/rs6000/rs6000-logue.c
        (rs6000_emit_probe_stack_range_stack_clash): Always use gen_add3_insn,
        if it fails, move rs into end_addr and retry.  Add
        REG_FRAME_RELATED_EXPR note whenever it returns more than one insn or
        the insn pattern doesn't describe well what exactly happens to
        dwarf2cfi.c.

        * gcc.target/powerpc/pr93122.c: New test.

Reply via email to