[PATCH] D121852: [scudo] Use templated builtins to avoid assumptions on SCUDO_WORDSIZE

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 24 12:56:00 PDT 2022


vitalybuka added inline comments.


================
Comment at: compiler-rt/lib/scudo/standalone/wrappers_c_checks.h:50
-#if __has_builtin(__builtin_umull_overflow) && (SCUDO_WORDSIZE == 64U)
-  return __builtin_umull_overflow(Size, N, Product);
-#elif __has_builtin(__builtin_umul_overflow) && (SCUDO_WORDSIZE == 32U)
----------------
Looks like not it's going to accept even signed or float types, but will not optimize unsigned long long
maybe just cast in existing implementation?
_builtin_umull_overflow(Size, N, reinterpret_cast<unsigned long*>Product);


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121852/new/

https://reviews.llvm.org/D121852



More information about the llvm-commits mailing list