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 <[email protected]>
PR target/59222
* lra.c (lra_emit_add): Check SUBREG too.
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)))
{