[PATCH] D119115: [RISCV] Improve insert_vector_elt for fixed mask registers.
Jianjian Guan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 21 02:08:33 PDT 2022
jacquesguan added a comment.
In D119115#3790207 <https://reviews.llvm.org/D119115#3790207>, @reames wrote:
> I don't think we should land this patch. It involves moving a value from vector to scalar and then back again. The vector to scalar domain crossing is likely to be expensive on at least some real hardware.
>
> We can probably do better by forming the bitmask on the vector side entirely. Given an index in a scalar register, we can produce a single bit mask by comparing a vid vector against that index. With that, we can construct a vmerge with a scalar operand to set or clear the desired bit in the mask.
I don't understand your last sentence well, I think that vmerge could not be used for mask type, so how to only merge the desired bit?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119115/new/
https://reviews.llvm.org/D119115
More information about the llvm-commits
mailing list