RE: [PATCH 1/2, combine] Try REG_EQUAL for nonzero_bits

2015-04-27 Thread Thomas Preud'homme
> From: Jeff Law [mailto:l...@redhat.com] > Sent: Saturday, April 25, 2015 2:57 AM > > +static rtx > > +sign_extend_short_imm (rtx src, machine_mode mode, unsigned int > prec) > > +{ > > + if (GET_MODE_PRECISION (mode) < prec && CONST_INT_P (src) > > + && INTVAL (src) > 0 && val_signbit_know

Re: [PATCH 1/2, combine] Try REG_EQUAL for nonzero_bits

2015-04-24 Thread Jeff Law
On 02/09/2015 06:51 PM, Thomas Preud'homme wrote: ChangeLog entry for part 1 is as follows: *** gcc/ChangeLog *** 2015-02-09 Thomas Preud'homme * combine.c (sign_extend_short_imm): New. (set_nonzero_bits_and_sign_copies): Use above new function for sign extension

RE: [PATCH 1/2, combine] Try REG_EQUAL for nonzero_bits

2015-04-24 Thread Thomas Preud'homme
Hi, first of all, sorry for the delay. We quickly entered stage 4 and I thought it was best waiting for stage 1 to update you on this. > From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- > ow...@gcc.gnu.org] On Behalf Of Thomas Preud'homme > > Of course both approaches are not exclusive.

RE: [PATCH 1/2, combine] Try REG_EQUAL for nonzero_bits

2015-02-13 Thread Thomas Preud'homme
> From: Alan Modra [mailto:amo...@gmail.com] > Sent: Thursday, February 12, 2015 4:35 PM > > > > > >Actually this bit seems unnecessary as there is already some logic in > > >nonzero_bits1 for the CONST_INT case. So I guess the code can be > > >removed and the comment be moved there at the very lea

Re: [PATCH 1/2, combine] Try REG_EQUAL for nonzero_bits

2015-02-12 Thread Alan Modra
On Tue, Feb 10, 2015 at 11:03:57PM -0700, Jeff Law wrote: > On 02/09/15 19:19, Thomas Preud'homme wrote: > >>From: Andrew Pinski [mailto:pins...@gmail.com] > >>Sent: Tuesday, February 10, 2015 9:57 AM > > > >>>+#ifdef SHORT_IMMEDIATES_SIGN_EXTEND > >>>+/* If MODE has a precision lower than PREC and

RE: [PATCH 1/2, combine] Try REG_EQUAL for nonzero_bits

2015-02-10 Thread Thomas Preud'homme
> From: Jeff Law [mailto:l...@redhat.com] > Sent: Wednesday, February 11, 2015 2:49 PM > > > > Wouldn't that only tell whether the macro can stay undefined for > rs6000? > > MD files for rs6000 could have been tighten since then but not others > > backend's MD files. > It's certainly possible, but

Re: [PATCH 1/2, combine] Try REG_EQUAL for nonzero_bits

2015-02-10 Thread Jeff Law
On 02/10/15 23:42, Thomas Preud'homme wrote: From: Jeff Law [mailto:l...@redhat.com] Sent: Wednesday, February 11, 2015 2:04 PM Given the rs6000 is affected, one could do before/after tests natively in the gcc farm to ensure that removing that code doesn't change the generated code across a boot

RE: [PATCH 1/2, combine] Try REG_EQUAL for nonzero_bits

2015-02-10 Thread Thomas Preud'homme
> From: Jeff Law [mailto:l...@redhat.com] > Sent: Wednesday, February 11, 2015 2:04 PM > > Given the rs6000 is affected, one could do before/after tests natively > in the gcc farm to ensure that removing that code doesn't change the > generated code across a bootstrap. Wouldn't that only tell whe

Re: [PATCH 1/2, combine] Try REG_EQUAL for nonzero_bits

2015-02-10 Thread Jeff Law
On 02/09/15 19:19, Thomas Preud'homme wrote: From: Andrew Pinski [mailto:pins...@gmail.com] Sent: Tuesday, February 10, 2015 9:57 AM +#ifdef SHORT_IMMEDIATES_SIGN_EXTEND +/* If MODE has a precision lower than PREC and SRC is a non-negative constant + that would appear negative in MODE, sig

RE: [PATCH 1/2, combine] Try REG_EQUAL for nonzero_bits

2015-02-09 Thread Thomas Preud'homme
> From: Andrew Pinski [mailto:pins...@gmail.com] > Sent: Tuesday, February 10, 2015 9:57 AM > > +#ifdef SHORT_IMMEDIATES_SIGN_EXTEND > > +/* If MODE has a precision lower than PREC and SRC is a non-negative > constant > > + that would appear negative in MODE, sign-extend SRC for use in > nonzero

Re: [PATCH 1/2, combine] Try REG_EQUAL for nonzero_bits

2015-02-09 Thread Andrew Pinski
On Mon, Feb 9, 2015 at 5:51 PM, Thomas Preud'homme wrote: > Hi Eric, > > I'm taking over Zhenqiang's work on this. Comments and updated patch > below. > >> From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- >> ow...@gcc.gnu.org] On Behalf Of Eric Botcazou >> > + rtx reg_equal = insn ? find_

RE: [PATCH 1/2, combine] Try REG_EQUAL for nonzero_bits

2015-02-09 Thread Thomas Preud'homme
Hi Eric, I'm taking over Zhenqiang's work on this. Comments and updated patch below. > From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- > ow...@gcc.gnu.org] On Behalf Of Eric Botcazou > > + rtx reg_equal = insn ? find_reg_equal_equiv_note (insn) : NULL_RTX; > > + unsigned HOST_WIDE_INT