Missing vector intrinsic vec_xxpermdi #4

Closed
opened 5 years ago by everton1984 · 4 comments
everton1984 commented 5 years ago (Migrated from github.com)

As we can see here https://gcc.gnu.org/onlinedocs/gcc/PowerPC-AltiVec-Built-in-Functions-Available-on-ISA-2_002e06.html there is an intrinsic vec_xxpermdi which is not present here.

As we can see here https://gcc.gnu.org/onlinedocs/gcc/PowerPC-AltiVec-Built-in-Functions-Available-on-ISA-2_002e06.html there is an intrinsic vec_xxpermdi which is not present here.
wschmidt-ibm commented 5 years ago (Migrated from github.com)

Hi Everton,

There are a lot of intrinsics that are available in GCC that are not
listed in the intrisics guide (or in the ELFv2 ABI Appendix A).  These
intrinsics are the ones that are agreed upon as required to be provided
by all compliant compilers, not just GCC.

Thanks,

Bill

On 9/6/19 11:03 AM, Everton Constantino wrote:

As we can see here
https://gcc.gnu.org/onlinedocs/gcc/PowerPC-AltiVec-Built-in-Functions-Available-on-ISA-2_002e06.html
there is an intrinsic vec_xxpermdi which is not present here.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/OpenPOWERFoundation/Programming-Guides/issues/4?email_source=notifications&email_token=ABKD4KJBVH4EZ24GWWRUMITQIJ5NJA5CNFSM4IUKTZZKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HJ3ABLQ,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABKD4KIOEAWIHHZEEZIQMSDQIJ5NJANCNFSM4IUKTZZA.

Hi Everton, There are a lot of intrinsics that are available in GCC that are not listed in the intrisics guide (or in the ELFv2 ABI Appendix A).  These intrinsics are the ones that are agreed upon as required to be provided by all compliant compilers, not just GCC. Thanks, Bill On 9/6/19 11:03 AM, Everton Constantino wrote: > > As we can see here > https://gcc.gnu.org/onlinedocs/gcc/PowerPC-AltiVec-Built-in-Functions-Available-on-ISA-2_002e06.html > there is an intrinsic vec_xxpermdi which is not present here. > > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub > <https://github.com/OpenPOWERFoundation/Programming-Guides/issues/4?email_source=notifications&email_token=ABKD4KJBVH4EZ24GWWRUMITQIJ5NJA5CNFSM4IUKTZZKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HJ3ABLQ>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/ABKD4KIOEAWIHHZEEZIQMSDQIJ5NJANCNFSM4IUKTZZA>. >
everton1984 commented 5 years ago (Migrated from github.com)

Thanks Bill, and the link I sent is the only place where I can find some documentation on that particular intrinsic? I like the way the docs list the asm translations for all intrinsics and the nice descriptions. What's the rule to have one intrinsic listed here then?

Thanks Bill, and the link I sent is the only place where I can find some documentation on that particular intrinsic? I like the way the docs list the asm translations for all intrinsics and the nice descriptions. What's the rule to have one intrinsic listed here then?
wschmidt-ibm commented 5 years ago (Migrated from github.com)

Yes, that extremely limited documentation is all there is for
vec_xxpermdi, unfortunately.

Intrinsics to be included are agreed upon between the LTC folks that
support GCC and the Toronto folks that support LLVM and XL/Wyvern.  This
particular intrinsic is not included for a couple of reasons.  First,
the naming convention doesn't match what we traditionally support (the
"xx" in xxpermdi indicates a VSX-specific instruction, and we don't make
a distinction between VMX and VSX flavors in our naming; we also don't
include size/type information like the "d" in xxpermdi).  Second, there
are ways of getting what you want from xxpermdi without using a
built-in.  For example, if you have a vector double "vd" and you want to
use xxpermdi to swap it, you can simply write

  vector double swapped = (vector double){ vd[1], vd[0] };

and you should get an xxpermdi instruction out of the compiler. (I
haven't tested this lately, but it ought to work. :-)  If you want to
use xxpermdi to splat the first element of "vd", you can use

  vector double splatted = vec_splat (vd, 0);

So vec_xxpermdi is both redundant and badly named, and thus isn't
included in the required set of intrinsics.  If we did choose to add it
someday, it would need to be renamed to something like vec_permi to meet
our naming standards.

Thanks,

Bill

On 9/10/19 7:08 AM, Everton Constantino wrote:

Thanks Bill, and the link I sent is the only place where I can find
some documentation on that particular intrinsic? I like the way the
docs list the asm translations for all intrinsics and the nice
descriptions. What's the rule to have one intrinsic listed here then?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/OpenPOWERFoundation/Programming-Guides/issues/4?email_source=notifications&email_token=ABKD4KIG5YXI7OSESZQ53ELQI6E4DA5CNFSM4IUKTZZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6K3JTA#issuecomment-529904844,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABKD4KMLQLIBTB7B7CFOUE3QI6E4DANCNFSM4IUKTZZA.

Yes, that extremely limited documentation is all there is for vec_xxpermdi, unfortunately. Intrinsics to be included are agreed upon between the LTC folks that support GCC and the Toronto folks that support LLVM and XL/Wyvern.  This particular intrinsic is not included for a couple of reasons.  First, the naming convention doesn't match what we traditionally support (the "xx" in xxpermdi indicates a VSX-specific instruction, and we don't make a distinction between VMX and VSX flavors in our naming; we also don't include size/type information like the "d" in xxpermdi).  Second, there are ways of getting what you want from xxpermdi without using a built-in.  For example, if you have a vector double "vd" and you want to use xxpermdi to swap it, you can simply write   vector double swapped = (vector double){ vd[1], vd[0] }; and you should get an xxpermdi instruction out of the compiler. (I haven't tested this lately, but it ought to work. :-)  If you want to use xxpermdi to splat the first element of "vd", you can use   vector double splatted = vec_splat (vd, 0); So vec_xxpermdi is both redundant and badly named, and thus isn't included in the required set of intrinsics.  If we did choose to add it someday, it would need to be renamed to something like vec_permi to meet our naming standards. Thanks, Bill On 9/10/19 7:08 AM, Everton Constantino wrote: > > Thanks Bill, and the link I sent is the only place where I can find > some documentation on that particular intrinsic? I like the way the > docs list the asm translations for all intrinsics and the nice > descriptions. What's the rule to have one intrinsic listed here then? > > — > You are receiving this because you commented. > Reply to this email directly, view it on GitHub > <https://github.com/OpenPOWERFoundation/Programming-Guides/issues/4?email_source=notifications&email_token=ABKD4KIG5YXI7OSESZQ53ELQI6E4DA5CNFSM4IUKTZZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6K3JTA#issuecomment-529904844>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/ABKD4KMLQLIBTB7B7CFOUE3QI6E4DANCNFSM4IUKTZZA>. >
everton1984 commented 5 years ago (Migrated from github.com)

Awesome, thanks a lot Bill, this definitely helps!

Awesome, thanks a lot Bill, this definitely helps!
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: systemsoftware/Programming-Guides#4
Loading…
There is no content yet.