http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49114
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vmakarov at redhat dot com
Component|target |rtl-optimization
--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> 2011-05-24 23:14:55
UTC ---
gen_reload has
if (CONSTANT_P (op1) || MEM_P (op1) || GET_CODE (op1) == SUBREG
|| (REG_P (op1)
&& REGNO (op1) >= FIRST_PSEUDO_REGISTER)
|| (code != CODE_FOR_nothing
&& !insn_operand_matches (code, 2, op1)))
tem = op0, op0 = op1, op1 = tem;
When IN is
(plus:SI (subreg:SI (reg/v/f:DI 182 [ b ]) 0)
(const_int 8 [0x8]))
OP0 is SUBREG. Swapping seems odd since we prefer SUBREG as OP0.
I am testing this patch
@@ -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 (((CONSTANT_P (op1) || MEM_P (op1))
+ && GET_CODE (op0) != SUBREG)
+ || GET_CODE (op1) == SUBREG
|| (REG_P (op1)
&& REGNO (op1) >= FIRST_PSEUDO_REGISTER)
|| (code != CODE_FOR_nothing