This is the mail archive of the
mailing list for the GCC project.
Re: bug in lra-constraints.c (simple_move_p register_move_cost)
- From: Vladimir Makarov <vmakarov at redhat dot com>
- To: BELBACHIR Selim <selim dot belbachir at fr dot thalesgroup dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Thu, 18 Dec 2014 16:05:47 -0500
- Subject: Re: bug in lra-constraints.c (simple_move_p register_move_cost)
- Authentication-results: sourceware.org; auth=none
- References: <15985_1418741654_54904796_15985_12268_1_9C88BF562A27AA41B242B2780441926E21376A46DF at THSONEA01CMS05P dot one dot grp>
On 2014-12-16 9:53 AM, BELBACHIR Selim wrote:
I may have found a bug when I was trying to port my private backend to new LRA pass (using gcc 4.9.2+patches).
In lra-constraints.c, in function simple_move_p, the target hook targetm.register_move_cost is called with two badly swapped parameters :
targetm.register_move_cost (GET_MODE (src), sclass, dclass)
should be :
targetm.register_move_cost (GET_MODE (src), dclass, sclass)
In my port of GCC it leads to an error when checking constrain_operands at the end of LRA pass
Thanks for reporting this typo. I'll fix it soon. It did not affect
other ports as usually the cost is symmetric relative to the args
(especially when the cost is 2).