================
@@ -831,6 +832,14 @@ of different sizes and signs is forbidden in binary and 
ternary builtins.
                                                 semantics, see `LangRef
                                                 
<http://llvm.org/docs/LangRef.html#llvm-min-intrinsics-comparation>`_
                                                 for the comparison.
+ T __builtin_elementwise_clz(T x[, T y])        return the number of leading 0 
bits in the first argument. If          integer types
+                                                the first argument is 0 and an 
optional second argument is provided,
+                                                the second argument is 
returned. If the first argument is 0 but only
+                                                one argument is provided, the 
behaviour is undefined.
+ T __builtin_elementwise_ctz(T x[, T y])        return the number of trailing 
0 bits in the first argument. If         integer types
+                                                the first argument is 0 and an 
optional second argument is provided,
+                                                the second argument is 
returned. If the first argument is 0 but only
+                                                one argument is provided, the 
behaviour is undefined.
----------------
frasercrmck wrote:

> Could do an RFC I suppose. I always found the target selection of behavior 
> absurd with the gcc builtins

I've started an RFC: 
https://discourse.llvm.org/t/rfc-introducing-elementwise-clz-ctz-builtins/85862.

https://github.com/llvm/llvm-project/pull/131995
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to