Avoid LOAD_EXTEND_OP on non-integer mode

Adam Nemet anemet@caviumnetworks.com
Mon Oct 13 21:30:00 GMT 2008


"Joseph S. Myers" <joseph@codesourcery.com> writes:
> 	* combine.c (simplify_set): Avoid calling LOAD_EXTEND_OP on
> 	non-integer modes.
>
> Index: gcc/combine.c
> ===================================================================
> --- gcc/combine.c	(revision 141048)
> +++ gcc/combine.c	(working copy)
> @@ -5843,6 +5843,7 @@
>       zero_extend to avoid the reload that would otherwise be required.  */
>  
>    if (GET_CODE (src) == SUBREG && subreg_lowpart_p (src)
> +      && GET_MODE_CLASS (GET_MODE (SUBREG_REG (src))) == MODE_INT
>        && LOAD_EXTEND_OP (GET_MODE (SUBREG_REG (src))) != UNKNOWN
>        && SUBREG_BYTE (src) == 0
>        && (GET_MODE_SIZE (GET_MODE (src))

FWIW, we used to have the same change (except formulated with INTEGRAL_MODE_P)
in our older (3.4) compiler.

Adam



More information about the Gcc-patches mailing list