Re: [0/7] Type promotion pass and elimination of zext/sext

2015-12-16 Thread Richard Biener
On Thu, Dec 10, 2015 at 1:27 AM, Kugan wrote: > Hi Riachard, > > Thanks for the reviews. > > I think since we have some unresolved issues here, it is best to aim for > the next stage1. I however would like any feedback so that I can > continue to improve this.

Re: [0/7] Type promotion pass and elimination of zext/sext

2015-12-09 Thread Kugan
Hi Riachard, Thanks for the reviews. I think since we have some unresolved issues here, it is best to aim for the next stage1. I however would like any feedback so that I can continue to improve this. https://gcc.gnu.org/ml/gcc-patches/2015-09/msg01063.html is also related to

Re: [0/7] Type promotion pass and elimination of zext/sext

2015-11-23 Thread Kugan
Hi Richard, Thanks for you comments. I am attaching an updated patch with details below. On 19/11/15 02:06, Richard Biener wrote: > On Wed, Nov 18, 2015 at 3:04 PM, Richard Biener > wrote: >> On Sat, Nov 14, 2015 at 2:15 AM, Kugan >>

Re: [0/7] Type promotion pass and elimination of zext/sext

2015-11-18 Thread Richard Biener
On Wed, Nov 18, 2015 at 3:04 PM, Richard Biener wrote: > On Sat, Nov 14, 2015 at 2:15 AM, Kugan > wrote: >> >> Attached is the latest version of the patch. With the patches >> 0001-Add-new-SEXT_EXPR-tree-code.patch, >>

Re: [0/7] Type promotion pass and elimination of zext/sext

2015-11-18 Thread Richard Biener
On Sat, Nov 14, 2015 at 2:15 AM, Kugan wrote: > > Attached is the latest version of the patch. With the patches > 0001-Add-new-SEXT_EXPR-tree-code.patch, > 0002-Add-type-promotion-pass.patch and > 0003-Optimize-ZEXT_EXPR-with-tree-vrp.patch. > > I did bootstrap

Re: [0/7] Type promotion pass and elimination of zext/sext

2015-11-13 Thread Kugan
Attached is the latest version of the patch. With the patches 0001-Add-new-SEXT_EXPR-tree-code.patch, 0002-Add-type-promotion-pass.patch and 0003-Optimize-ZEXT_EXPR-with-tree-vrp.patch. I did bootstrap on ppc64-linux-gnu, aarch64-linux-gnu and x64-64-linux-gnu and regression testing on

Re: [0/7] Type promotion pass and elimination of zext/sext

2015-11-11 Thread Kugan
Hi Richard, Thanks for the review. >>> >>> The basic "structure" thing still remains. You walk over all uses and >>> defs in all stmts >>> in promote_all_stmts which ends up calling promote_ssa_if_not_promoted on >>> all >>> uses and defs which in turn promotes (the "def") and then fixes up

Re: [0/7] Type promotion pass and elimination of zext/sext

2015-11-10 Thread Richard Biener
On Sun, Nov 8, 2015 at 10:43 AM, Kugan wrote: > > Thanks Richard for the comments. Please find the attached patches which > now passes bootstrap with x86_64-none-linux-gnu, aarch64-linux-gnu and > ppc64-linux-gnu. Regression testing is ongoing. Please find the

Re: [0/7] Type promotion pass and elimination of zext/sext

2015-11-08 Thread Kugan
Thanks Richard for the comments. Please find the attached patches which now passes bootstrap with x86_64-none-linux-gnu, aarch64-linux-gnu and ppc64-linux-gnu. Regression testing is ongoing. Please find the comments for your questions/suggestions below. > > I notice > > diff --git

Re: [0/7] Type promotion pass and elimination of zext/sext

2015-11-03 Thread Richard Biener
On Mon, Nov 2, 2015 at 10:17 AM, Kugan wrote: > > > On 29/10/15 02:45, Richard Biener wrote: >> On Tue, Oct 27, 2015 at 1:50 AM, kugan >> wrote: >>> >>> >>> On 23/10/15 01:23, Richard Biener wrote: On Thu, Oct 22,

Re: [0/7] Type promotion pass and elimination of zext/sext

2015-11-02 Thread Kugan
On 29/10/15 02:45, Richard Biener wrote: > On Tue, Oct 27, 2015 at 1:50 AM, kugan > wrote: >> >> >> On 23/10/15 01:23, Richard Biener wrote: >>> >>> On Thu, Oct 22, 2015 at 12:50 PM, Kugan >>> wrote: On

Re: [0/7] Type promotion pass and elimination of zext/sext

2015-10-28 Thread Richard Biener
On Tue, Oct 27, 2015 at 1:50 AM, kugan wrote: > > > On 23/10/15 01:23, Richard Biener wrote: >> >> On Thu, Oct 22, 2015 at 12:50 PM, Kugan >> wrote: >>> >>> >>> >>> On 21/10/15 23:45, Richard Biener wrote: On Tue,

Re: [0/7] Type promotion pass and elimination of zext/sext

2015-10-26 Thread kugan
On 23/10/15 01:23, Richard Biener wrote: On Thu, Oct 22, 2015 at 12:50 PM, Kugan wrote: On 21/10/15 23:45, Richard Biener wrote: On Tue, Oct 20, 2015 at 10:03 PM, Kugan wrote: On 07/09/15 12:53, Kugan wrote: This

Re: [0/7] Type promotion pass and elimination of zext/sext

2015-10-22 Thread Kugan
On 21/10/15 23:45, Richard Biener wrote: > On Tue, Oct 20, 2015 at 10:03 PM, Kugan > wrote: >> >> >> On 07/09/15 12:53, Kugan wrote: >>> >>> This a new version of the patch posted in >>> https://gcc.gnu.org/ml/gcc-patches/2015-08/msg00226.html. I have done >>>

Re: [0/7] Type promotion pass and elimination of zext/sext

2015-10-22 Thread Richard Biener
On Thu, Oct 22, 2015 at 12:50 PM, Kugan wrote: > > > On 21/10/15 23:45, Richard Biener wrote: >> On Tue, Oct 20, 2015 at 10:03 PM, Kugan >> wrote: >>> >>> >>> On 07/09/15 12:53, Kugan wrote: This a new version of the

Re: [0/7] Type promotion pass and elimination of zext/sext

2015-10-22 Thread Richard Biener
On Wed, Oct 21, 2015 at 7:55 PM, Richard Henderson wrote: > On 10/21/2015 03:56 AM, Richard Biener wrote: >> >> On Wed, Oct 21, 2015 at 2:45 PM, Richard Biener >> wrote: >>> >>> On Tue, Oct 20, 2015 at 10:03 PM, Kugan >>>

Re: [0/7] Type promotion pass and elimination of zext/sext

2015-10-21 Thread Richard Biener
On Wed, Oct 21, 2015 at 2:45 PM, Richard Biener wrote: > On Tue, Oct 20, 2015 at 10:03 PM, Kugan > wrote: >> >> >> On 07/09/15 12:53, Kugan wrote: >>> >>> This a new version of the patch posted in >>>

Re: [0/7] Type promotion pass and elimination of zext/sext

2015-10-21 Thread Richard Henderson
On 10/21/2015 03:56 AM, Richard Biener wrote: On Wed, Oct 21, 2015 at 2:45 PM, Richard Biener wrote: On Tue, Oct 20, 2015 at 10:03 PM, Kugan wrote: On 07/09/15 12:53, Kugan wrote: This a new version of the patch posted in

Re: [0/7] Type promotion pass and elimination of zext/sext

2015-10-21 Thread Joseph Myers
On Wed, 21 Oct 2015, Richard Biener wrote: > Or maybe we should simply make GIMPLE _always_ adhere to the ABI > details from the start (gimplification). Note that this does not only involve > PROMOTE_MODE. Note that for what GIMPLE is concerned I'd only > "lower" passing / returning in

Re: [0/7] Type promotion pass and elimination of zext/sext

2015-10-21 Thread Richard Biener
On Tue, Oct 20, 2015 at 10:03 PM, Kugan wrote: > > > On 07/09/15 12:53, Kugan wrote: >> >> This a new version of the patch posted in >> https://gcc.gnu.org/ml/gcc-patches/2015-08/msg00226.html. I have done >> more testing and spitted the patch to make it more

Re: [0/7] Type promotion pass and elimination of zext/sext

2015-10-20 Thread Kugan
On 07/09/15 12:53, Kugan wrote: > > This a new version of the patch posted in > https://gcc.gnu.org/ml/gcc-patches/2015-08/msg00226.html. I have done > more testing and spitted the patch to make it more easier to review. > There are still couple of issues to be addressed and I am working on

Re: [0/7] Type promotion pass and elimination of zext/sext

2015-09-08 Thread Renlin Li
Hi Andrew, Previously, there is a discussion thread in binutils mailing list: https://sourceware.org/ml/binutils/2015-04/msg00032.html Nick proposed a way to fix, Richard Henderson hold similar opinion as you. Regards, Renlin On 07/09/15 12:45, pins...@gmail.com wrote: On Sep 7, 2015,

RE: [0/7] Type promotion pass and elimination of zext/sext

2015-09-08 Thread Wilco Dijkstra
> Renlin Li wrote: > Hi Andrew, > > Previously, there is a discussion thread in binutils mailing list: > > https://sourceware.org/ml/binutils/2015-04/msg00032.html > > Nick proposed a way to fix, Richard Henderson hold similar opinion as you. Both Nick and Richard H seem to think it is an

Re: [0/7] Type promotion pass and elimination of zext/sext

2015-09-07 Thread Kugan
On 07/09/15 20:46, Wilco Dijkstra wrote: >> Kugan wrote: >> 2. vector-compare-1.c from c-c++-common/torture fails to assemble with >> -O3 -g Error: unaligned opcodes detected in executable segment. It works >> fine if I remove the -g. I am looking into it and needs to be fixed as well. > > This

RE: [0/7] Type promotion pass and elimination of zext/sext

2015-09-07 Thread Wilco Dijkstra
> pins...@gmail.com wrote: > > On Sep 7, 2015, at 7:22 PM, Kugan wrote: > > > > > > > > On 07/09/15 20:46, Wilco Dijkstra wrote: > >>> Kugan wrote: > >>> 2. vector-compare-1.c from c-c++-common/torture fails to assemble with > >>> -O3 -g Error: unaligned opcodes

RE: [0/7] Type promotion pass and elimination of zext/sext

2015-09-07 Thread Wilco Dijkstra
> Kugan wrote: > 2. vector-compare-1.c from c-c++-common/torture fails to assemble with > -O3 -g Error: unaligned opcodes detected in executable segment. It works > fine if I remove the -g. I am looking into it and needs to be fixed as well. This is a known assembler bug I found a while back,

Re: [0/7] Type promotion pass and elimination of zext/sext

2015-09-07 Thread pinskia
> On Sep 7, 2015, at 7:22 PM, Kugan wrote: > > > > On 07/09/15 20:46, Wilco Dijkstra wrote: >>> Kugan wrote: >>> 2. vector-compare-1.c from c-c++-common/torture fails to assemble with >>> -O3 -g Error: unaligned opcodes detected in executable segment. It

[0/7] Type promotion pass and elimination of zext/sext

2015-09-06 Thread Kugan
This a new version of the patch posted in https://gcc.gnu.org/ml/gcc-patches/2015-08/msg00226.html. I have done more testing and spitted the patch to make it more easier to review. There are still couple of issues to be addressed and I am working on them. 1. AARCH64 bootstrap now fails with the