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, should we warn or give an error ?
1. yes, it is a valid combination for LRA.
2. With the point of view satisfying insn constraints, there is no
difference with =&, but as operand with +& is treated as input/output
and one with =& only as output, it might results in different reload
insns when the insn constraints are not satisfied. Although it is hard
for me to say exactly what the difference could be as it is too complicated.
Also using +& instead of &= might result in different reg costs and
different results in IRA (global RA) and even in register-pressure
sensitive insn scheduler, and in loop invariant motion.
3. So it is hard for me to say about usefulness of such construction
with LRA point of view or should we give a warn or an error. Probably
there is small usefulness of +& as it is very hard to describe what the
difference in comparison with '=&' will be for GCC developer or user.