[llvm] [NFC][IR] Add CreateCountTrailingZeroElems helper (PR #106711)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 2 04:00:47 PDT 2024
================
@@ -1079,6 +1079,14 @@ class IRBuilderBase {
nullptr, Name);
}
+ /// Create a call to llvm.experimental_cttz_elts
+ Value *CreateCountTrailingZeroElems(Type *ResTy, Value *Mask,
+ const Twine &Name = "") {
+ return CreateIntrinsic(
+ Intrinsic::experimental_cttz_elts, {ResTy, Mask->getType()},
+ {Mask, getInt1(/*ZeroIsPoison=*/true)}, nullptr, Name);
----------------
david-arm wrote:
Good suggestion! Uploaded a new patch.
https://github.com/llvm/llvm-project/pull/106711
More information about the llvm-commits
mailing list