@@ -1,3 +1,9 @@
+2011-05-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR rtl-optimization/49114
+ * reload1.c (gen_reload): Properly handle
+ (set reg:X (plus:X (subreg:X (reg:Y) 0) (const_int)))
+
2011-05-21 H.J. Lu <hongjiu.lu@intel.com>
PR rtl-optimization/49088
@@ -8528,7 +8528,9 @@ gen_reload (rtx out, rtx in, int opnum, enum reload_type type)
code = optab_handler (add_optab, GET_MODE (out));
- if (CONSTANT_P (op1) || MEM_P (op1) || GET_CODE (op1) == SUBREG
+ if ((GET_CODE (op0) != SUBREG
+ && (CONSTANT_P (op1) || MEM_P (op1)))
+ || GET_CODE (op1) == SUBREG
|| (REG_P (op1)
&& REGNO (op1) >= FIRST_PSEUDO_REGISTER)
|| (code != CODE_FOR_nothing