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

--- Comment #2 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
In Arm mode the compiler restricts 64-bit sized objects to be even/odd pairs of
core registers (ie starting in r0, r2, etc).  However, the ABI for this packed
object is trying to use (r1,r2) for passing the parameter and thus the compiler
generates

(set (reg:DF r1) (mem:DF(ptr)))

during expand.  This is already wrong, but not disastrous, since the compiler
could split this operation later on.  But a later pass turns the (mem:DF (ptr))
into a pre-inc because there's an earlier increment of the address.  We then
hit the assert during output because we can't handle the post-inc and splitting
the load into separate word operations.

There's multiple places where it might be argued this is going wrong:
- during expand (gen_movdi) when we should be splitting the operation into
parts for this case
- during auto-inc when the modified auto-inc pattern is not being correctly
validated
- during register allocation when the register allocation is not being checked
correctly.

I suspect the problem really is in the first of these - at least until we can
show that later passes don't merge things together again without validation.

Reply via email to