https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118480
--- Comment #10 from Segher Boessenkool <segher at gcc dot gnu.org> --- (In reply to Steven Munroe from comment #8) > It seems the evolution of the PowerISA and Vector intrinsics has not been > smooth. > > It is not obvious how to generate xxspltib from an intrinsic. > Vec_splat_s/u/# is very specific to VMX vspltisb/h/w and 5 bit SIMs. > Vec_splati is restricted to power10 and xxspltiw. Vec_splats seems to be > intended for transferring scalars (GPRs) to vector elements. But might > generate xxspltib for char type consts. > > But is seems that both new splat intrinsics and vector extension constants > are getting tangled up in old (VMX) infrastructure? It is unfortunate that "splat" and "splat immediate" have names so close to each other, but both very different semantics and extremely different execution behaviour / performance. "Splat" copies the data in one lane to all lanes. "Splat immediate" generates a (small) constant integer in all lanes (in all lanes the same constant). They are completely different things in most implementations (well, it is sensible to do both in a permute unit, if the implementation has one, you would need prohibitively long wires for all more obvious ways of implementing it in an ALU). And please see my previous #c9 .