Re: combination of read/write and earlyclobber constraint modifier

2014-07-02 Thread Jeff Law
On 07/02/14 00:23, Marc Glisse wrote: On Tue, 1 Jul 2014, Tom de Vries wrote: On 01-07-14 21:58, Marc Glisse wrote: So my question is: is the combination of '&' and '+' supported ? If so, what is the exact semantics ? If not, should we warn or give an error ? I don't think we can define any r

Re: combination of read/write and earlyclobber constraint modifier

2014-07-02 Thread Jeff Law
On 07/01/14 13:58, Marc Glisse wrote: I don't think we can define any reasonable semantics for &+. My recommendation would be for this to be considered a hard error. Uh? The doc explicitly says "An input operand can be tied to an earlyclobber operand" and goes on to explain why that is useful.

Re: combination of read/write and earlyclobber constraint modifier

2014-07-02 Thread Vladimir Makarov
On 2014-07-01, 3:27 PM, Tom de Vries wrote: Vladimir, There are a few patterns which use both the read/write constraint modifier (+) and the earlyclobber constraint modifier (&): So my question is: is the combination of '&' and '+' supported ? If so, what is the exact semantics ? If not, shou

Re: combination of read/write and earlyclobber constraint modifier

2014-07-02 Thread Joern Rennecke
On 2 July 2014 08:02, Marc Glisse wrote: > On Wed, 2 Jul 2014, Tom de Vries wrote: > >> On 02-07-14 08:23, Marc Glisse wrote: >>> >>> I think it could have used (match_dup 0) instead of operand 1, if there >>> had been only the first alternative. And then the constraint would have been >>> +&. >>

Re: combination of read/write and earlyclobber constraint modifier

2014-07-02 Thread Tom de Vries
On 02-07-14 11:36, Marc Glisse wrote: (did you drop the lists on purpose?) That was a glitch, sorry. [ Adds list back ] Thanks, - Tom On Wed, 2 Jul 2014, Tom de Vries wrote: An earlyclobber operand X prevents *other* input operands from using the same register, but that does not include X

Re: combination of read/write and earlyclobber constraint modifier

2014-07-02 Thread Marc Glisse
On Wed, 2 Jul 2014, Tom de Vries wrote: On 02-07-14 09:02, Marc Glisse wrote: Still, the meaning of +&, in inline asm for instance, seems relatively clear, no? I can't find any testsuite examples using this construct. Furthermore, I'd expect the same semantics and restrictions for constraint

Re: combination of read/write and earlyclobber constraint modifier

2014-07-02 Thread Tom de Vries
On 02-07-14 09:02, Marc Glisse wrote: Still, the meaning of +&, in inline asm for instance, seems relatively clear, no? I can't find any testsuite examples using this construct. Furthermore, I'd expect the same semantics and restrictions for constraints in rtl templates and inline asm. So

Re: combination of read/write and earlyclobber constraint modifier

2014-07-02 Thread Marc Glisse
On Wed, 2 Jul 2014, Tom de Vries wrote: On 02-07-14 08:23, Marc Glisse wrote: I think it could have used (match_dup 0) instead of operand 1, if there had been only the first alternative. And then the constraint would have been +&. isn't that explicitly listed as unsupported here ( https://g

Re: combination of read/write and earlyclobber constraint modifier

2014-07-01 Thread Tom de Vries
On 02-07-14 08:23, Marc Glisse wrote: On Tue, 1 Jul 2014, Tom de Vries wrote: On 01-07-14 21:58, Marc Glisse wrote: So my question is: is the combination of '&' and '+' supported ? If so, what is the exact semantics ? If not, should we warn or give an error ? I don't think we can define any r

Re: combination of read/write and earlyclobber constraint modifier

2014-07-01 Thread Marc Glisse
On Tue, 1 Jul 2014, Tom de Vries wrote: On 01-07-14 21:58, Marc Glisse wrote: So my question is: is the combination of '&' and '+' supported ? If so, what is the exact semantics ? If not, should we warn or give an error ? I don't think we can define any reasonable semantics for &+. My recomme

Re: combination of read/write and earlyclobber constraint modifier

2014-07-01 Thread Tom de Vries
On 01-07-14 21:58, Marc Glisse wrote: So my question is: is the combination of '&' and '+' supported ? If so, what is the exact semantics ? If not, should we warn or give an error ? I don't think we can define any reasonable semantics for &+. My recommendation would be for this to be considered

Re: combination of read/write and earlyclobber constraint modifier

2014-07-01 Thread Marc Glisse
On Tue, 1 Jul 2014, Jeff Law wrote: On 07/01/14 13:27, Tom de Vries wrote: Vladimir, There are a few patterns which use both the read/write constraint modifier (+) and the earlyclobber constraint modifier (&): ... $ grep -c 'match_operand.*+.*&' gcc/config/*/* | grep -v :0 gcc/config/aarch64/a

Re: combination of read/write and earlyclobber constraint modifier

2014-07-01 Thread Jeff Law
On 07/01/14 13:27, Tom de Vries wrote: Vladimir, There are a few patterns which use both the read/write constraint modifier (+) and the earlyclobber constraint modifier (&): ... $ grep -c 'match_operand.*+.*&' gcc/config/*/* | grep -v :0 gcc/config/aarch64/aarch64-simd.md:1 gcc/config/arc/arc.md