[clang] [clang] Implement __builtin_popcountg (PR #82359)

Björn Pettersson via cfe-commits cfe-commits at lists.llvm.org
Thu May 2 03:51:26 PDT 2024


================
@@ -3216,7 +3216,8 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
   case Builtin::BI__popcnt64:
   case Builtin::BI__builtin_popcount:
   case Builtin::BI__builtin_popcountl:
-  case Builtin::BI__builtin_popcountll: {
+  case Builtin::BI__builtin_popcountll:
+  case Builtin::BI__builtin_popcountg: {
----------------
bjope wrote:

I've opened a pull-request to also adjust the codegen here, to make sure that we use an unsigned cast between the LLVM intrinsic result type and the builtins return type. See https://github.com/llvm/llvm-project/pull/90845

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


More information about the cfe-commits mailing list