On 11/13/22 16:05, Christoph Muellner wrote:
From: Philipp Tomsich <philipp.toms...@vrull.eu>
As a basis for optimized string functions (e.g., the by-pieces
implementations), we need orc.b available. This adds orc.b as an
unspec, so we can expand to it.
gcc/ChangeLog:
* config/riscv/bitmanip.md (orcb<mode>2): Add orc.b as an
unspec.
* config/riscv/riscv.md: Add UNSPEC_ORC_B.
In general, we should prefer to express things as "real" RTL rather than
UNSPECS. In this particular case expressing the orc could be done with
a handful of IOR expressions, though they'd probably need to reference
byte SUBREGs of the input and I dislike explicit SUBREGs in the md file
even more than UNSPECs. So....
OK.
Jeff
ps. We could consider this a reduc_ior_scal insn, but that may be
actively harmful. Having vector ops on the general and vector registers
is a wart I hope we can avoid.