[Bug target/89190] [8 regression][ARM] armv8-m.base invalid ldm ICE

wilco at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jul 16 12:01:00 GMT 2019


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

--- Comment #4 from Wilco <wilco at gcc dot gnu.org> ---
Author: wilco
Date: Tue Jul 16 12:00:42 2019
New Revision: 273523

URL: https://gcc.gnu.org/viewcvs?rev=273523&root=gcc&view=rev
Log:
[ARM] Fix Thumb-1 ldm (PR89190)

This patch fixes an ICE in the Thumb-1 LDM peepholer.  Thumb-1 LDMs
always update the base register except if the base is loaded.
The current implementation rejects LDMs where the base is not dead,
however this doesn't exclude the case where the base is loaded as
well as dead.  Fix this by explicitly checking whether the base is
loaded.  Also enable LDMs which load the first register.

    gcc/
        PR target/89190
        * config/arm/arm.c (ldm_stm_operation_p) Set
        addr_reg_in_reglist correctly for first register.
        (load_multiple_sequence): Remove dead base check.
        (gen_ldm_seq): Correctly set write_back for Thumb-1.

    testsuite/
        PR target/89190
        * gcc.target/arm/pr89190.c: New test.

Added:
    branches/gcc-8-branch/gcc/testsuite/gcc.target/arm/pr89190.c
Modified:
    branches/gcc-8-branch/gcc/ChangeLog
    branches/gcc-8-branch/gcc/config/arm/arm.c
    branches/gcc-8-branch/gcc/testsuite/ChangeLog


More information about the Gcc-bugs mailing list