[Bug target/88847] gcc.target/aarch64/sve/struct_move_1.c ICE with -fstack-protector-strong

tnfchris at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Feb 13 14:05:00 GMT 2019


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

--- Comment #4 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
Author: tnfchris
Date: Wed Feb 13 14:04:41 2019
New Revision: 268845

URL: https://gcc.gnu.org/viewcvs?rev=268845&root=gcc&view=rev
Log:
AArch64: Allow any offset for SVE addressing modes before reload.

On AArch64 aarch64_classify_address has a case for when it's non-strict
that will allow it to accept any byte offset from a reg when validating
an address in a given addressing mode.

This because reload would later make the address valid. SVE however requires
the address always be valid, but currently allows any address when a MEM +
offset is used.  This causes an ICE as nothing later forces the address to be
legitimate.

The patch forces aarch64_emit_sve_pred_move via expand_insn to ensure that
the addressing mode is valid for any loads/stores it creates, which follows
the SVE way of handling address classifications.

gcc/ChangeLog:

        PR target/88847
        * config/aarch64/aarch64-sve.md (*pred_mov<mode>, pred_mov<mode>):
        Expose as @aarch64_pred_mov.
        * config/aarch64/aarch64.c (aarch64_classify_address):
        Use expand_insn which legitimizes operands.

gcc/testsuite/ChangeLog:

        PR target/88847
        * gcc.target/aarch64/sve/pr88847.c: New test.


Added:
    trunk/gcc/testsuite/gcc.target/aarch64/sve/pr88847.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/aarch64/aarch64-sve.md
    trunk/gcc/config/aarch64/aarch64.c
    trunk/gcc/testsuite/ChangeLog


More information about the Gcc-bugs mailing list