Open ImpleLee opened 1 month ago
@llvm/issue-subscribers-backend-x86
Author: Imple Lee (ImpleLee)
It is not currently possible to generate pext from anything other than intrinsics or inline assembly.
It is not currently possible to generate pext from anything other than intrinsics or inline assembly.
Thank you for your reply. Should I close this issue or leave it as a to-do for general pext
generation? I am OK with both options.
Not exactly the same, but discourse has discussed making generic pdep/pext intrinsics in the past: https://discourse.llvm.org/t/how-would-i-go-about-implementing-new-bit-manipulation-builtins-for-my-proposal-especially-generic-builtins/76523
I want to use x86-64
pext
, but I also want my function to look platform-agnostic, so I don't want to use intrinsics or inline assembly. I tried some semantic-equivalent implementations ofpext
I found online, but none of them can be compiled topext
. Is it really possible to make the compiler generate thepext
instruction? Or will there be any plan to support this behavior?Here are the
pext
implementations I tried. ( https://godbolt.org/z/f3vMTf8ob )