On 6/3/21 3:19 PM, Segher Boessenkool wrote:
On Thu, Jun 03, 2021 at 08:09:36AM -0500, Bill Schmidt wrote:
Note also that swap optimization can handle more general cases than
simplify-rtx.
Do you have examples? That should be fixed (unless it is something
Power-specific?)
It is Power-specific. This optimization looks at entire webs of
computation to determine whether the computation can be done in the
"wrong" lanes without problems, and removes all the extra swaps at
once. That is beyond what simplify-rtx is capable of. It takes full
dataflow analysis to see what can legally be done. As a side effect,
p8swaps takes care of some cases that simplify-rtx would catch at that
particular point in compilation, but not all.
In my view it's best to have it covered in both places.
Oh certainly, and we need that p8swaps pass on at least p8 anyway (but
perhaps we can allow TImode in vector regs on later cpus).
Yes, I agree that should potentially be revisited, but we still have the
ABI requirement to keep them in GPRs for parameter passing, so there are
limits on what we can do.
Bill
Segher