This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Avoid LOAD_EXTEND_OP on non-integer mode
- From: Adam Nemet <anemet at caviumnetworks dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 13 Oct 2008 12:20:16 -0700
- Subject: Re: Avoid LOAD_EXTEND_OP on non-integer mode
- References: <Pine.LNX.4.64.0810121618030.24074@digraph.polyomino.org.uk>
"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