[PATCH] D136432: [AMDGPU] Combine BFI instructions.
Thomas Symalla via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 21 02:20:46 PDT 2022
tsymalla added a comment.
In D136432#3873859 <https://reviews.llvm.org/D136432#3873859>, @jsilvanus wrote:
> One inline comment on a comment :).
>
> Slightly related: How do we handle `(X1 & Y) | (X2 & ~Y)` where `Y` is a variable?
Thanks!
As such case cannot be combined into a BFI instruction, I guess it's relatively straight-forwardly translated into something like this:
v_and_b32 v0, x1, y ; v0 = X1 & Y
v_not_b32 v1, y ; v1 = ~Y
v_and_or_b32 v1, v1, x2, v1 ; v1 = (~Y & X2) | (X1 & Y)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136432/new/
https://reviews.llvm.org/D136432
More information about the llvm-commits
mailing list