[PATCH] D137276: [RISCV] Add cost model for fixed broadcast shuffle
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 21 11:54:56 PST 2022
reames accepted this revision.
reames added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp:258
+ // Example sequence:
+ // vsetivli zero, 2, e8, mf8, ta, mu (ignored)
+ // vmv.v.i v8, 0
----------------
I think we have some room to improve this codegen, but that's orthogonal to your actual patch.
Ideas:
* vrgather allows a immediate broadcast index.
* We know we're broadcasting the low bit, can copy the value to scalar register and mask. Once we have that, need to form either a zero or all ones mask or the right length.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137276/new/
https://reviews.llvm.org/D137276
More information about the llvm-commits
mailing list