[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 19 04:33:18 PDT 2025


================
@@ -1484,6 +1484,18 @@ def ElementwiseSubSat : Builtin {
   let Prototype = "void(...)";
 }
 
+def ElementwiseClz : Builtin {
+  let Spellings = ["__builtin_elementwise_clz"];
+  let Attributes = [NoThrow, Const, CustomTypeChecking, Constexpr];
+  let Prototype = "void(...)";
+}
+
+def ElementwiseCtz : Builtin {
+  let Spellings = ["__builtin_elementwise_ctz"];
+  let Attributes = [NoThrow, Const, CustomTypeChecking, Constexpr];
----------------
tbaederr wrote:

There is no constexpr implementation in this patch.

https://github.com/llvm/llvm-project/pull/131995


More information about the cfe-commits mailing list