I know these are not part of the spec, but it would make coding easier, as a GNU extension.
What does "32<->64" mean?
vector unsigned long long unpacked; vector unsigned int packedl, packedr; unpacked = vec_pack(packedl, packedr); packedl = vec_unpackh(unpacked); packedr = vec_unpackl(unpacked);
What should the semantics of this be? There are four 32-bit elts each in packedl and packedr, which of those go where in unpacked? I think what you want to do can be expressed with just two or maybe three existing builtins, but it's not clear to me exactly what you want.
Oh my bad, I got it backwards vector unsigned long long unpackedl, unpackedr; vector unsigned int packed; packed = vec_pack(unpackedl, unpackedr); unpackedl = vec_unpackh(packed); unpackedr = vec_unpackl(packed); The point is that it is similar to the other pack/unpack unfunctions. Yet somehow this one doesn't exist (probably because there is no hardware instruction for it).
vec_unpack* works on vectors of signed integers only, not unsigned. You need to target at least power8 (-mcpu=power8) to get the long long versions of this, i.e. the vpkudum and vupk[hl]sw instructions. This is all documented correctly, as far as I see? In the ISA doc, in the ABI doc, and in the GCC docs? (Power8 is ISA 2.07, we could add some clarification for that).
Ahh, sorry for wasting your time. I didn't notice the signed requirement, which is why it didn't work.
Note that vec_pack works for unsigned as well. For vec_unpack[hl] of unsigned you can do a vec_merge[hl] instead (with the first arg a zero vector).