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

Wilco <wilco at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |wilco at gcc dot gnu.org
                 CC|                            |wilco at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

--- Comment #8 from Wilco <wilco at gcc dot gnu.org> ---
Confirmed. Small example:

long long f(long long *p)
{
   return __atomic_load_n (p+32, __ATOMIC_RELAXED);
}

It only fails on ARM and if the offset is between 256 and 1024. This is a
latent bug: arm_legitimate_index_p has an explicit check that disallows
anything over 256, but an earlier check for VALID_NEON_DREG_MODE oddly enough
allows DImode and a larger range. Moving the Neon check after LDRD check fixes
this.

Note using ldrd_strd_offset_operand/Do should also work, but the existing code
for 'm' is supposed to handle this correctly.

Reply via email to