http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47725
--- Comment #4 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-02-14
08:03:53 UTC ---
> --- a/gcc/combine.c
> +++ b/gcc/combine.c
> @@ -2138,6 +2138,12 @@ cant_combine_insn_p (rtx insn)
> return asm_noperands (PATTERN (insn)) > 0;
> src = SET_SRC (set);
> dest = SET_DEST (set);
> + if (GET_CODE (src) == ZERO_EXTEND
> + || GET_CODE (src) == SIGN_EXTEND)
> + src = XEXP (src, 0);
> + if (GET_CODE (dest) == ZERO_EXTEND
> + || GET_CODE (dest) == SIGN_EXTEND)
> + dest = XEXP (dest, 0);
> if (GET_CODE (src) == SUBREG)
> src = SUBREG_REG (src);
> if (GET_CODE (dest) == SUBREG)
ZERO_EXTEND and SIGN_EXTEND are real operations (they generate code) though, so
this will pessimize.
Who generates insn #2? The machinery handling parameters in function.c? If
so, maybe it should do the copy in the incoming mode instead:
(insn 2 4 3 2 (set (reg/v/f:SI 59 [ pc_target ])
(reg:SI 5 di [ pc_target ]))
(insn 3 5 4 2 (set (reg:DI 60)
(zero_extend:DI (reg/v/f:SI 59 [ pc_target ])))