[clang] [clang] Implement __builtin_{clzg,ctzg} (PR #83431)
Nick Desaulniers via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 25 10:58:27 PDT 2024
================
@@ -660,15 +660,23 @@ def Clz : Builtin, BitShort_Int_Long_LongLongTemplate {
let Prototype = "int(unsigned T)";
}
-// FIXME: Add int clzimax(uintmax_t)
+def Clzg : Builtin {
+ let Spellings = ["__builtin_clzg"];
+ let Attributes = [NoThrow, Const, CustomTypeChecking];
----------------
nickdesaulniers wrote:
Should `Constexpr` be in this list of attributes?
https://godbolt.org/z/Efd3EW5xE
https://github.com/llvm/llvm-project/pull/83431
More information about the cfe-commits
mailing list