Re: [PATCH] Enhance ifcombine to recover non short circuit branches

2013-11-11 Thread Richard Biener
On Fri, Nov 8, 2013 at 6:41 PM, Steven Bosscher wrote: > On Fri, Nov 8, 2013 at 6:20 PM, Steven Bosscher wrote: >> On Wed, Oct 30, 2013 at 5:03 AM, Andrew Pinski wrote: >>> Here is what I applied in the end; Jeff told me just to remove the >>> testcase. I added the comment trying to explain why i

Re: [PATCH] Enhance ifcombine to recover non short circuit branches

2013-11-08 Thread Steven Bosscher
On Fri, Nov 8, 2013 at 10:46 PM, Jeff Law wrote: > Also note that other patches have gone in recently which include those files > for exactly the same reason. I assume you're referring to tree-ssa-reassoc.c? It's the only new one I could find since I cleaned rtl.h out from almost all tree-* files

Re: [PATCH] Enhance ifcombine to recover non short circuit branches

2013-11-08 Thread Jeff Law
On 11/08/13 10:45, pins...@gmail.com wrote: On Nov 8, 2013, at 9:20 AM, Steven Bosscher wrote: On Wed, Oct 30, 2013 at 5:03 AM, Andrew Pinski wrote: Here is what I applied in the end; Jeff told me just to remove the testcase. I added the comment trying to explain why it was the opposite or

Re: [PATCH] Enhance ifcombine to recover non short circuit branches

2013-11-08 Thread pinskia
> On Nov 8, 2013, at 9:20 AM, Steven Bosscher wrote: > >> On Wed, Oct 30, 2013 at 5:03 AM, Andrew Pinski wrote: >> Here is what I applied in the end; Jeff told me just to remove the >> testcase. I added the comment trying to explain why it was the >> opposite order of PHI-opt. >> >> Thanks, >

Re: [PATCH] Enhance ifcombine to recover non short circuit branches

2013-11-08 Thread Steven Bosscher
On Fri, Nov 8, 2013 at 6:20 PM, Steven Bosscher wrote: > On Wed, Oct 30, 2013 at 5:03 AM, Andrew Pinski wrote: >> Here is what I applied in the end; Jeff told me just to remove the >> testcase. I added the comment trying to explain why it was the >> opposite order of PHI-opt. >> >> Thanks, >> Andr

Re: [PATCH] Enhance ifcombine to recover non short circuit branches

2013-11-08 Thread Steven Bosscher
On Wed, Oct 30, 2013 at 5:03 AM, Andrew Pinski wrote: > Here is what I applied in the end; Jeff told me just to remove the > testcase. I added the comment trying to explain why it was the > opposite order of PHI-opt. > > Thanks, > Andrew Pinski > > ChangeLog: > * tree-ssa-ifcombine.c: Include rtl.

Re: [PATCH] Enhance ifcombine to recover non short circuit branches

2013-10-29 Thread Andrew Pinski
On Tue, Oct 29, 2013 at 3:28 AM, Richard Biener wrote: > On Sun, Oct 27, 2013 at 7:55 PM, Andrew Pinski wrote: >> On Sat, Oct 26, 2013 at 4:49 PM, Andrew Pinski wrote: >>> On Sat, Oct 26, 2013 at 2:30 PM, Andrew Pinski wrote: On Fri, Oct 18, 2013 at 2:21 AM, Zhenqiang Chen wrote: >>>

Re: [PATCH] Enhance ifcombine to recover non short circuit branches

2013-10-29 Thread Jeff Law
On 10/29/13 09:14, Andrew Pinski wrote: On Mon, Oct 28, 2013 at 10:51 PM, Jeff Law wrote: On 10/27/13 12:55, Andrew Pinski wrote: Here is my latest patch which adds the testcases from Zhenqiang's patch and fixes item 1 and 2. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressio

Re: [PATCH] Enhance ifcombine to recover non short circuit branches

2013-10-29 Thread Andrew Pinski
On Mon, Oct 28, 2013 at 10:51 PM, Jeff Law wrote: > On 10/27/13 12:55, Andrew Pinski wrote: >> >> Here is my latest patch which adds the testcases from Zhenqiang's >> patch and fixes item 1 and 2. >> >> OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. >> >> Thanks, >> Andrew P

Re: [PATCH] Enhance ifcombine to recover non short circuit branches

2013-10-29 Thread Richard Biener
On Sun, Oct 27, 2013 at 7:55 PM, Andrew Pinski wrote: > On Sat, Oct 26, 2013 at 4:49 PM, Andrew Pinski wrote: >> On Sat, Oct 26, 2013 at 2:30 PM, Andrew Pinski wrote: >>> On Fri, Oct 18, 2013 at 2:21 AM, Zhenqiang Chen >>> wrote: On 18 October 2013 00:58, Jeff Law wrote: > On 10/17/13

Re: [PATCH] Enhance ifcombine to recover non short circuit branches

2013-10-28 Thread Jeff Law
On 10/27/13 12:55, Andrew Pinski wrote: Here is my latest patch which adds the testcases from Zhenqiang's patch and fixes item 1 and 2. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. Thanks, Andrew Pinski ChangeLog: * tree-ssa-ifcombine.c: Include rtl.h and tm_p.h. (ifco

Re: [PATCH] Enhance ifcombine to recover non short circuit branches

2013-10-28 Thread Zhenqiang Chen
On 28 October 2013 02:55, Andrew Pinski wrote: > On Sat, Oct 26, 2013 at 4:49 PM, Andrew Pinski wrote: >> On Sat, Oct 26, 2013 at 2:30 PM, Andrew Pinski wrote: >>> On Fri, Oct 18, 2013 at 2:21 AM, Zhenqiang Chen >>> wrote: On 18 October 2013 00:58, Jeff Law wrote: > On 10/17/13 05:03,

Re: [PATCH] Enhance ifcombine to recover non short circuit branches

2013-10-27 Thread Andrew Pinski
On Sat, Oct 26, 2013 at 4:49 PM, Andrew Pinski wrote: > On Sat, Oct 26, 2013 at 2:30 PM, Andrew Pinski wrote: >> On Fri, Oct 18, 2013 at 2:21 AM, Zhenqiang Chen >> wrote: >>> On 18 October 2013 00:58, Jeff Law wrote: On 10/17/13 05:03, Richard Biener wrote: >>> >>> Is it OK for tru

Re: [PATCH] Enhance ifcombine to recover non short circuit branches

2013-10-26 Thread Andrew Pinski
On Sat, Oct 26, 2013 at 2:30 PM, Andrew Pinski wrote: > On Fri, Oct 18, 2013 at 2:21 AM, Zhenqiang Chen > wrote: >> On 18 October 2013 00:58, Jeff Law wrote: >>> On 10/17/13 05:03, Richard Biener wrote: >> >> Is it OK for trunk? > > > I had a much simpler change which did bas

Re: [PATCH] Enhance ifcombine to recover non short circuit branches

2013-10-26 Thread Andrew Pinski
On Wed, Oct 16, 2013 at 2:12 AM, Zhenqiang Chen wrote: > Hi, > > The patch enhances ifcombine pass to recover some non short circuit > branches. Basically, it will do the following transformation: > > Case 1: > if (cond1) > if (cond2) > ==> > if (cond1 && cond2) > > Case 2: > if (cond1)

Re: [PATCH] Enhance ifcombine to recover non short circuit branches

2013-10-26 Thread Andrew Pinski
On Fri, Oct 18, 2013 at 2:21 AM, Zhenqiang Chen wrote: > On 18 October 2013 00:58, Jeff Law wrote: >> On 10/17/13 05:03, Richard Biener wrote: > > Is it OK for trunk? I had a much simpler change which did basically the same from 4.7 (I can update it if people think thi

Re: [PATCH] Enhance ifcombine to recover non short circuit branches

2013-10-18 Thread Jeff Law
On 10/18/13 03:53, Richard Biener wrote: I think we want a "proper" predicate in tree-cfg.c for this, like maybe a subset of tree_forwarder_block_p or whatever it will end up looking like (we need "effectively empty BB" elsewhere, for example in vectorization, add a flag to allow a condition end

Re: [PATCH] Enhance ifcombine to recover non short circuit branches

2013-10-18 Thread Richard Biener
On Fri, Oct 18, 2013 at 12:34 PM, Zhenqiang Chen wrote: > On 18 October 2013 18:15, Richard Biener wrote: >> On Fri, Oct 18, 2013 at 12:06 PM, Zhenqiang Chen >> wrote: >>> On 18 October 2013 17:53, Richard Biener wrote: On Fri, Oct 18, 2013 at 11:21 AM, Zhenqiang Chen wrote: > On

Re: [PATCH] Enhance ifcombine to recover non short circuit branches

2013-10-18 Thread Zhenqiang Chen
On 18 October 2013 10:13, Andrew Pinski wrote: > On Thu, Oct 17, 2013 at 6:39 PM, Andrew Pinski wrote: >> On Thu, Oct 17, 2013 at 4:03 AM, Richard Biener >> wrote: >>> On Thu, Oct 17, 2013 at 4:14 AM, Andrew Pinski wrote: On Wed, Oct 16, 2013 at 2:12 AM, Zhenqiang Chen wrote: > H

Re: [PATCH] Enhance ifcombine to recover non short circuit branches

2013-10-18 Thread Zhenqiang Chen
On 18 October 2013 18:15, Richard Biener wrote: > On Fri, Oct 18, 2013 at 12:06 PM, Zhenqiang Chen > wrote: >> On 18 October 2013 17:53, Richard Biener wrote: >>> On Fri, Oct 18, 2013 at 11:21 AM, Zhenqiang Chen >>> wrote: On 18 October 2013 00:58, Jeff Law wrote: > On 10/17/13 05:03,

Re: [PATCH] Enhance ifcombine to recover non short circuit branches

2013-10-18 Thread Richard Biener
On Fri, Oct 18, 2013 at 12:06 PM, Zhenqiang Chen wrote: > On 18 October 2013 17:53, Richard Biener wrote: >> On Fri, Oct 18, 2013 at 11:21 AM, Zhenqiang Chen >> wrote: >>> On 18 October 2013 00:58, Jeff Law wrote: On 10/17/13 05:03, Richard Biener wrote: >>> >>> Is it OK for trunk?

Re: [PATCH] Enhance ifcombine to recover non short circuit branches

2013-10-18 Thread Zhenqiang Chen
On 18 October 2013 17:53, Richard Biener wrote: > On Fri, Oct 18, 2013 at 11:21 AM, Zhenqiang Chen > wrote: >> On 18 October 2013 00:58, Jeff Law wrote: >>> On 10/17/13 05:03, Richard Biener wrote: >> >> Is it OK for trunk? > > > I had a much simpler change which did basicall

Re: [PATCH] Enhance ifcombine to recover non short circuit branches

2013-10-18 Thread Richard Biener
On Fri, Oct 18, 2013 at 11:21 AM, Zhenqiang Chen wrote: > On 18 October 2013 00:58, Jeff Law wrote: >> On 10/17/13 05:03, Richard Biener wrote: > > Is it OK for trunk? I had a much simpler change which did basically the same from 4.7 (I can update it if people think th

Re: [PATCH] Enhance ifcombine to recover non short circuit branches

2013-10-18 Thread Zhenqiang Chen
On 18 October 2013 00:58, Jeff Law wrote: > On 10/17/13 05:03, Richard Biener wrote: Is it OK for trunk? >>> >>> >>> I had a much simpler change which did basically the same from 4.7 (I >>> can update it if people think this is a better approach). >> >> >> I like that more (note you can

Re: [PATCH] Enhance ifcombine to recover non short circuit branches

2013-10-17 Thread Andrew Pinski
On Thu, Oct 17, 2013 at 6:39 PM, Andrew Pinski wrote: > On Thu, Oct 17, 2013 at 4:03 AM, Richard Biener > wrote: >> On Thu, Oct 17, 2013 at 4:14 AM, Andrew Pinski wrote: >>> On Wed, Oct 16, 2013 at 2:12 AM, Zhenqiang Chen >>> wrote: Hi, The patch enhances ifcombine pass to recove

Re: [PATCH] Enhance ifcombine to recover non short circuit branches

2013-10-17 Thread Andrew Pinski
On Thu, Oct 17, 2013 at 4:03 AM, Richard Biener wrote: > On Thu, Oct 17, 2013 at 4:14 AM, Andrew Pinski wrote: >> On Wed, Oct 16, 2013 at 2:12 AM, Zhenqiang Chen >> wrote: >>> Hi, >>> >>> The patch enhances ifcombine pass to recover some non short circuit >>> branches. Basically, it will do the

Re: [PATCH] Enhance ifcombine to recover non short circuit branches

2013-10-17 Thread Jeff Law
On 10/17/13 05:03, Richard Biener wrote: Is it OK for trunk? I had a much simpler change which did basically the same from 4.7 (I can update it if people think this is a better approach). I like that more (note you can now use is_gimple_condexpr as predicate for force_gimple_operand). The obv

Re: [PATCH] Enhance ifcombine to recover non short circuit branches

2013-10-17 Thread Richard Biener
On Thu, Oct 17, 2013 at 4:14 AM, Andrew Pinski wrote: > On Wed, Oct 16, 2013 at 2:12 AM, Zhenqiang Chen > wrote: >> Hi, >> >> The patch enhances ifcombine pass to recover some non short circuit >> branches. Basically, it will do the following transformation: >> >> Case 1: >> if (cond1) >> i

Re: [PATCH] Enhance ifcombine to recover non short circuit branches

2013-10-16 Thread Andrew Pinski
On Wed, Oct 16, 2013 at 2:12 AM, Zhenqiang Chen wrote: > Hi, > > The patch enhances ifcombine pass to recover some non short circuit > branches. Basically, it will do the following transformation: > > Case 1: > if (cond1) > if (cond2) > ==> > if (cond1 && cond2) > > Case 2: > if (cond1)

Re: [PATCH] Enhance ifcombine to recover non short circuit branches

2013-10-16 Thread Marc Glisse
On Wed, 16 Oct 2013, Zhenqiang Chen wrote: The patch enhances ifcombine pass to recover some non short circuit branches. Basically, it will do the following transformation: Case 1: if (cond1) if (cond2) ==> if (cond1 && cond2) Hello, it might be more clear if you wrote (cond1 & cond2) s