Re: [PATCH] Fix up CSE handling of const/pure calls (PR rtl-optimization/71532)

2016-06-15 Thread Jeff Law
On 06/15/2016 07:14 PM, Alan Modra wrote: On Wed, Jun 15, 2016 at 04:03:04PM -0600, Jeff Law wrote: FWIW I don't think ownership of the argument slots has ever been definitively addressed by any ABI and it's been an open question in my mind for 20+ years -- though I've largely leaned towards

Re: [PATCH] Fix up CSE handling of const/pure calls (PR rtl-optimization/71532)

2016-06-15 Thread Alan Modra
On Wed, Jun 15, 2016 at 04:03:04PM -0600, Jeff Law wrote: > FWIW I don't think ownership of the argument slots has ever been > definitively addressed by any ABI and it's been an open question in my mind > for 20+ years -- though I've largely leaned towards callee ownership on my > own thinking.

Re: [PATCH] Fix up CSE handling of const/pure calls (PR rtl-optimization/71532)

2016-06-15 Thread Jeff Law
On 06/15/2016 01:46 PM, Jakub Jelinek wrote: Hi! As the following testcase shows, CSE mishandles const/pure calls, it assumes that const/pure calls can't clobber even their argument slots. But, the argument slots are owned by the callee, so need to be volatile across the calls. On the

[PATCH] Fix up CSE handling of const/pure calls (PR rtl-optimization/71532)

2016-06-15 Thread Jakub Jelinek
Hi! As the following testcase shows, CSE mishandles const/pure calls, it assumes that const/pure calls can't clobber even their argument slots. But, the argument slots are owned by the callee, so need to be volatile across the calls. On the testcase the second round of argument stores is