This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] combine: Handle zero_extend without subreg in change_zero_ext.
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: vogt at linux dot vnet dot ibm dot com, gcc-patches at gcc dot gnu dot org
- Date: Thu, 12 Jan 2017 11:02:36 -0600
- Subject: Re: [RFC] combine: Handle zero_extend without subreg in change_zero_ext.
- Authentication-results: sourceware.org; auth=none
- References: <20170105164651.GA6294@linux.vnet.ibm.com>
Hi Dominik,
Thanks for the example. ROSBG, what a weird instruction.
On Thu, Jan 05, 2017 at 05:46:51PM +0100, Dominik Vogt wrote:
> --- a/gcc/combine.c
> +++ b/gcc/combine.c
> @@ -11372,6 +11372,16 @@ change_zero_ext_src (subrtx_ptr_iterator *piter)
> else if (GET_CODE (x) == ZERO_EXTEND
> && SCALAR_INT_MODE_P (mode)
> && REG_P (XEXP (x, 0))
> + && !HARD_REGISTER_P (XEXP (x, 0))
> + && GET_MODE_PRECISION (GET_MODE (XEXP (x, 0)))
> + < GET_MODE_PRECISION (mode))
> + {
> + /* (zero_extract (reg)) -> (and (subreg (reg) 0) (const_int)) */
s/zero_extract/zero_extend/
> * combine.c (change_zero_ext_src): Handle zero_extend without subreg.
"Handle zero_extend of a pseudo."?
Okay for trunk with that. Thanks for the patch,
Segher