This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Avoid LOAD_EXTEND_OP on non-integer mode


"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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]