This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Why does lower-subreg mark copied pseudos as "decomposable"?
Richard Sandiford <rdsandiford@googlemail.com> writes:
>> In fact, the only examples of a pseudo-pseudo copy that won't be
>> eliminated by fwprop et al would be to do with loops and conditionals,
>> and I don't understand why they should be special.
>
> Not just those, because loads, stores, calls, volatiles, etc.,
> can't be moved freely. E.g. code like:
>
> uint64_t foo (uint64_t *x, uint64_t z)
> {
> uint64_t y = *x;
> *x = z;
> return y;
> }
>
> benefits too, because y must be a pseudo.
Er, please ignore this bit :-) There obviously doesn't need to be
a pseudo copy here. The later stuff still applies though.
Richard