[PATCH] D109295: [X86] Handle inverted inputs when matching VPTERNLOG from 2 binary ops.
LuoYuanke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 6 07:32:23 PDT 2021
LuoYuanke added a comment.
> I meant simplified from current generation:
>
> vpcmpeqd %ymm3, %ymm3, %ymm3
> vpternlogq $222, %ymm2, %ymm1, %ymm3
> vpternlogq $200, %ymm1, %ymm3, %ymm0
> retq
>
> We can save one vpternlogq.
I think we may have another algorithm which iterate 8 possible composition of 3 bits and calculate the result with multi-operates and get the immediate operand of VPTERNLOGD.
VPTERNLOGD reg1, reg2, src3
Bit(reg1) Bit(reg2) Bit(src3)
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109295/new/
https://reviews.llvm.org/D109295
More information about the llvm-commits
mailing list