On 2014-06-05, 8:37 AM, James Greenhalgh wrote:
On Wed, Jun 04, 2014 at 08:00:51PM +0100, Vladimir Makarov wrote:
From my perspective, I think this should go in, and be backported to 4.9.
I've committed it as rev. 211320 for trunk and rev. 211319 for gcc-4.9
branch.
2014-06-06 Vladimir Makarov <vmaka...@redhat.com>
* lra-constraints.c (process_address_1): Check scale equal to one
to prevent transformation: base + scale * index => base + new_reg.
Index: lra-constraints.c
===================================================================
--- lra-constraints.c (revision 211061)
+++ lra-constraints.c (working copy)
@@ -2974,6 +2974,13 @@ process_address_1 (int nop, rtx *before,
*ad.inner = simplify_gen_binary (PLUS, GET_MODE (new_reg),
new_reg, *ad.index);
}
+ else if (get_index_scale (&ad) == 1)
+ {
+ /* The last transformation to one reg will be made in
+ curr_insn_transform function. */
+ end_sequence ();
+ return false;
+ }
else
{
/* base + scale * index => base + new_reg,