[PATCH] D119115: [RISCV] Improve insert_vector_elt for fixed mask registers.

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 14 11:29:09 PDT 2022


reames requested changes to this revision.
reames added a comment.
This revision now requires changes to proceed.
Herald added a subscriber: shiva0217.

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.


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