[clang] [Clang] Add masked vector builtins for expand and compress access (PR #156042)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 29 08:58:24 PDT 2025
================
@@ -950,6 +950,11 @@ argument is always boolean mask vector. The ``__builtin_masked_load`` builtin
takes an optional third vector argument that will be used for the result of the
masked-off lanes. These builtins assume the memory is always aligned.
+The ``__builtin_masked_expand_load`` and ``__builtin_masked_compress_store``
+builtins have the same interface but store the result in consecutive indices.
+Effectively this performs the ``if (m[i]) v[i] = p[j++]`` and ``if (m[i])
----------------
erichkeane wrote:
I wish `val` and `ptr` were a bit more descriptive, but they are at least somewhat legible/relationable I think. This is good enough for now, but if you find yourself in need of a task, fleshing out these docs a bit would be appreciated.
https://github.com/llvm/llvm-project/pull/156042
More information about the cfe-commits
mailing list