Hi Jakub,
On 08/02/19 11:40, Jakub Jelinek wrote:
On Fri, Feb 08, 2019 at 11:29:10AM +0000, Matthew Malcomson wrote: > I'm pretty sure there's no difference between the iwmmxt target and > others so believe your simpler fix of just using 'q' is a good idea. > (there's no difference in gas and no documentation I have found mentions > a difference). The simpler patch would be then (but of course in that case the question is why iwmmxt.md doesn't use those q constraints for the output_move_double alternatives).
I think this is ok. The "q" constraint was introduced after the iwmmxt.md patterns were written and it seems that they were just never updated to use it. It's hard for anyone to get a hold of the relevant hardware to test iwmmxt these days, so I suspect that path hasn't been thoroughly tested. In my opinion the ldrd/strd-related logic there should follow the same approach as the rest of the arm backend, that is, using 'q'. A patch to update the iwmmxt.md constraints in that way is pre-approved. Thanks, Kyrill
2019-02-08 Jakub Jelinek <ja...@redhat.com> PR bootstrap/88714 * config/arm/ldrdstrd.md (*arm_ldrd, *arm_strd): Use q constraint instead of r. --- gcc/config/arm/ldrdstrd.md.jj 2019-02-08 11:25:42.368916124 +0100 +++ gcc/config/arm/ldrdstrd.md 2019-02-08 12:38:33.647585108 +0100 @@ -157,9 +157,9 @@ (define_peephole2 ; swap the destination ;; We use gen_operands_ldrd_strd() with a modify argument as false so that the ;; operands are not changed. (define_insn "*arm_ldrd" - [(parallel [(set (match_operand:SI 0 "s_register_operand" "=r") + [(parallel [(set (match_operand:SI 0 "s_register_operand" "=q") (match_operand:SI 2 "memory_operand" "m")) - (set (match_operand:SI 1 "s_register_operand" "=r") + (set (match_operand:SI 1 "s_register_operand" "=q") (match_operand:SI 3 "memory_operand" "m"))])] "TARGET_LDRD && TARGET_ARM && reload_completed && valid_operands_ldrd_strd (operands, true)" @@ -178,9 +178,9 @@ (define_insn "*arm_ldrd" (define_insn "*arm_strd" [(parallel [(set (match_operand:SI 2 "memory_operand" "=m") - (match_operand:SI 0 "s_register_operand" "r")) + (match_operand:SI 0 "s_register_operand" "q")) (set (match_operand:SI 3 "memory_operand" "=m") - (match_operand:SI 1 "s_register_operand" "r"))])] + (match_operand:SI 1 "s_register_operand" "q"))])] "TARGET_LDRD && TARGET_ARM && reload_completed && valid_operands_ldrd_strd (operands, false)" { Jakub