diff mbox

patch to fix PR59222

Message ID 530F7144.9030103@redhat.com
State New
Headers show

Commit Message

Vladimir Makarov Feb. 27, 2014, 5:09 p.m. UTC
The following patch fixes

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59222

The patch was successfully bootstrapped and tested on x86/x86-64.

Committed as rev. 208201.

2014-02-27  Vladimir Makarov  <vmakarov@redhat.com>

        PR target/59222
        * lra.c (lra_emit_add): Check SUBREG too.
diff mbox

Patch

Index: lra.c
===================================================================
--- lra.c	(revision 208174)
+++ lra.c	(working copy)
@@ -340,8 +340,9 @@  lra_emit_add (rtx x, rtx y, rtx z)
 	  base = a1;
 	  index = a2;
 	}
-      if (! REG_P (base)
-	  || (index != NULL_RTX && ! REG_P (index))
+      if (! (REG_P (base) || GET_CODE (base) == SUBREG)
+	  || (index != NULL_RTX
+	      && ! (REG_P (index) || GET_CODE (index) == SUBREG))
 	  || (disp != NULL_RTX && ! CONSTANT_P (disp))
 	  || (scale != NULL_RTX && ! CONSTANT_P (scale)))
 	{