diff mbox

patch to fix PR61325

Message ID 5391F90F.8070007@redhat.com
State New
Headers show

Commit Message

Vladimir Makarov June 6, 2014, 5:23 p.m. UTC
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  <vmakarov@redhat.com>

         * lra-constraints.c (process_address_1): Check scale equal to one
         to prevent transformation: base + scale * index => base + new_reg.
diff mbox

Patch

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,