[PATCH] D113178: [PowerPC] use right register class for input operand of XXPERMDIs

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 5 04:53:10 PDT 2021


nemanjai added a comment.

I am not in favour of this patch. The reasons I added `XXPERMDIs` a long time ago are:

1. To allow a single input operand for single register splat/swap. This is useful when the input is a load (since due to chains, having a load as an input will end up with both loads emitted - i.e. no CSE).
2. Since this is primarily useful for loads that load a partial vector (LFIWZX, etc.) the input register class is `vsfrc` (i.e. all scalar floating point registers).

Switching the register class to `vsrc` does end up producing the name of a VSX register, but I consider that a positive thing. It clearly shows the reader that this is operating on a partial vector. Of course the distinction is purely aesthetic, but I think it helps readability.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113178/new/

https://reviews.llvm.org/D113178



More information about the llvm-commits mailing list