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

--- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> I guess constraining the original patch to asms could be a solution.  I can
> make a patch and after testing will commit it if it is ok with you.
> 
> Something like
> 
> Index: lra-constraints.c
> ===================================================================
> --- lra-constraints.c   (revision 255470)
> +++ lra-constraints.c   (working copy)
> @@ -3222,7 +3222,8 @@
>    /* Do not attempt to decompose arbitrary addresses generated by combine
>       for asm operands with loose constraints, e.g 'X'.  */
>    else if (MEM_P (op)
> -          && !(get_constraint_type (cn) == CT_FIXED_FORM
> +          && !(INSN_CODE (curr_insn) < 0
> +               && get_constraint_type (cn) == CT_FIXED_FORM
>                 && constraint_satisfied_p (op, cn)))
>      decompose_mem_address (&ad, op);
>    else if (GET_CODE (op) == SUBREG

It's OK with me, but both the original patch and this one are only kludges. 
The problem is that they consider only the first alternative, i.e. they work
fine if there is only one "X" in the constraint but badly fail for e.g. "X,m".

I can simply revert the original patch and XFAIL the test, no big deal.

Reply via email to