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: Dominik Vogt <vogt at linux dot vnet dot ibm dot com>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 12 Jan 2017 19:28:14 +0100
- 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> <20170112170235.GT28613@gate.crashing.org>
- Reply-to: vogt at linux dot vnet dot ibm dot com
On Thu, Jan 12, 2017 at 11:02:36AM -0600, Segher Boessenkool wrote:
> 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."?
k
> Okay for trunk with that.
It still needs testing. I'll do that in a while.
Ciao
Dominik ^_^ ^_^
--
Dominik Vogt
IBM Germany