[clang] [clang] Implement __builtin_{clzg,ctzg} (PR #83431)

Nick Desaulniers via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 25 11:05:19 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:

Filed https://github.com/llvm/llvm-project/issues/86549

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


More information about the cfe-commits mailing list