Re: PR61385: phiopt drops some PHIs

2014-06-04 Thread Marc Glisse
On Tue, 3 Jun 2014, Jeff Law wrote: On 06/03/14 08:08, Richard Biener wrote: All arguments get the same value (and the PHI in middle-bb is surely a singleton?), so it's way better to re-materialize the PHI as a gimple assignment at the start of the basic block. If they are singletons (which I

Re: PR61385: phiopt drops some PHIs

2014-06-04 Thread Jeff Law
On 06/04/14 01:46, Marc Glisse wrote: On Tue, 3 Jun 2014, Jeff Law wrote: On 06/03/14 08:08, Richard Biener wrote: All arguments get the same value (and the PHI in middle-bb is surely a singleton?), so it's way better to re-materialize the PHI as a gimple assignment at the start of the basic

Re: PR61385: phiopt drops some PHIs

2014-06-04 Thread Bin.Cheng
On Tue, Jun 3, 2014 at 10:30 PM, Marc Glisse marc.gli...@inria.fr wrote: On Tue, 3 Jun 2014, Richard Biener wrote: On Tue, Jun 3, 2014 at 3:48 PM, Marc Glisse marc.gli...@inria.fr wrote: Hello, apparently it is possible to have a PHI in the middle basic block of value_replacement, so I

Re: PR61385: phiopt drops some PHIs

2014-06-04 Thread Richard Biener
On Wed, Jun 4, 2014 at 9:59 AM, Jeff Law l...@redhat.com wrote: On 06/04/14 01:46, Marc Glisse wrote: On Tue, 3 Jun 2014, Jeff Law wrote: On 06/03/14 08:08, Richard Biener wrote: All arguments get the same value (and the PHI in middle-bb is surely a singleton?), so it's way better to

Re: PR61385: phiopt drops some PHIs

2014-06-04 Thread Marc Glisse
On Wed, 4 Jun 2014, Richard Biener wrote: So I'd say we should instead simply bail out if the middle-bb has a PHI node. Sounds good to me, so I am testing the mini-patch I had originally posted to bugzilla: 2014-06-04 Marc Glisse marc.gli...@inria.fr PR tree-optimization/61385

Re: PR61385: phiopt drops some PHIs

2014-06-04 Thread Richard Biener
On Wed, Jun 4, 2014 at 1:20 PM, Marc Glisse marc.gli...@inria.fr wrote: On Wed, 4 Jun 2014, Richard Biener wrote: So I'd say we should instead simply bail out if the middle-bb has a PHI node. Sounds good to me, so I am testing the mini-patch I had originally posted to bugzilla: Ok.

PR61385: phiopt drops some PHIs

2014-06-03 Thread Marc Glisse
Hello, apparently it is possible to have a PHI in the middle basic block of value_replacement, so I need to move it as well when I move the statement and remove the block. Bootstrap and testsuite on x86_64-linux-gnu (re-running for various reasons but they had completed successfully

Re: PR61385: phiopt drops some PHIs

2014-06-03 Thread Richard Biener
On Tue, Jun 3, 2014 at 3:48 PM, Marc Glisse marc.gli...@inria.fr wrote: Hello, apparently it is possible to have a PHI in the middle basic block of value_replacement, so I need to move it as well when I move the statement and remove the block. Bootstrap and testsuite on x86_64-linux-gnu

Re: PR61385: phiopt drops some PHIs

2014-06-03 Thread Marc Glisse
On Tue, 3 Jun 2014, Richard Biener wrote: On Tue, Jun 3, 2014 at 3:48 PM, Marc Glisse marc.gli...@inria.fr wrote: Hello, apparently it is possible to have a PHI in the middle basic block of value_replacement, so I need to move it as well when I move the statement and remove the block.

Re: PR61385: phiopt drops some PHIs

2014-06-03 Thread Jeff Law
On 06/03/14 08:08, Richard Biener wrote: On Tue, Jun 3, 2014 at 3:48 PM, Marc Glisse marc.gli...@inria.fr wrote: Hello, apparently it is possible to have a PHI in the middle basic block of value_replacement, so I need to move it as well when I move the statement and remove the block.