> AFAICT it is probably safe to do the combination provided (in addition
    > to the normal restrictions on combine) that:

    I think this is a bad idea in practice, since volatile will be used
    to describe memory mapped devices, and combining can completely
    mess up the access. Yes, it is probably conforming, but it is
    simply not a good idea to do this, and the gain is too small.

The issue is that we currently don't combine if volatile is anywhere in
sight, whether or not we'd be affecting that access. Just because you have
something volatile on the LHS doesn't mean we can't combine into the RHS.  A
good example are addressing modes: if we have a MEM->MEM copy with one side
volatile, doing anything inside the addressing computation of either (even
the volatile one) is perfectly safe.

I do agree, of course, that the gain here is small, but we do lots of things
in GCC with small gains ...

Reply via email to