[PATCH] D159283: Add intrinsic to count trailing zero elements in a vector
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 1 09:45:49 PDT 2023
craig.topper added a comment.
The RISC-V instruction that we'd want to use for this is vfirst.m that returns -1 if no bits in a mask are set and the bit position of the first set bit otherwise. Determining that no bits are set is simply checking if the result is less than 0. This the same instruction we use for reduce.or on mask vectors.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D159283/new/
https://reviews.llvm.org/D159283
More information about the llvm-commits
mailing list