[libc-commits] [libc] Revert "[libc][NFC] Propagate LIBC_CONSTEXPR qualifier for those depending on bitt_cast." (PR #197462)

via libc-commits libc-commits at lists.llvm.org
Wed May 13 07:49:10 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Muhammad Bassiouni (bassiounix)

<details>
<summary>Changes</summary>

Reverts llvm/llvm-project#<!-- -->197355

---

Patch is 250.69 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/197462.diff


385 Files Affected:

- (modified) libc/src/__support/CPP/bit.h (+3-2) 
- (modified) libc/src/__support/FPUtil/FPBits.h (+2-5) 
- (modified) libc/src/__support/FPUtil/NormalFloat.h (+10-12) 
- (modified) libc/src/__support/FPUtil/bfloat16.h (+15-15) 
- (modified) libc/src/__support/FPUtil/cast.h (+1-2) 
- (modified) libc/src/__support/FPUtil/generic/FMA.h (+1-1) 
- (modified) libc/src/__support/FPUtil/generic/sqrt.h (+1-1) 
- (modified) libc/src/__support/FPUtil/generic/sqrt_80_bit_long_double.h (+1-1) 
- (modified) libc/src/__support/FPUtil/x86_64/NextAfterLongDouble.h (+1-2) 
- (modified) libc/src/__support/big_int.h (+122-128) 
- (modified) libc/src/__support/complex_basic_ops.h (+1-1) 
- (modified) libc/src/__support/macros/attributes.h (+7-10) 
- (modified) libc/src/__support/math/acos.h (+1-1) 
- (modified) libc/src/__support/math/acosf.h (+1-1) 
- (modified) libc/src/__support/math/acosf16.h (+1-1) 
- (modified) libc/src/__support/math/acoshf.h (+1-1) 
- (modified) libc/src/__support/math/acoshf16.h (+1-1) 
- (modified) libc/src/__support/math/acospif16.h (+1-1) 
- (modified) libc/src/__support/math/asin_utils.h (+7-8) 
- (modified) libc/src/__support/math/asinf.h (+1-1) 
- (modified) libc/src/__support/math/asinf16.h (+1-1) 
- (modified) libc/src/__support/math/asinhf.h (+1-1) 
- (modified) libc/src/__support/math/asinhf16.h (+1-1) 
- (modified) libc/src/__support/math/asinpi.h (+1-2) 
- (modified) libc/src/__support/math/atan.h (+1-1) 
- (modified) libc/src/__support/math/atan2.h (+1-1) 
- (modified) libc/src/__support/math/atan2f.h (+2-3) 
- (modified) libc/src/__support/math/atan2f128.h (+16-16) 
- (modified) libc/src/__support/math/atan2f_float.h (+2-2) 
- (modified) libc/src/__support/math/atan_utils.h (+3-4) 
- (modified) libc/src/__support/math/atanf.h (+1-1) 
- (modified) libc/src/__support/math/atanf16.h (+1-1) 
- (modified) libc/src/__support/math/atanhf.h (+1-1) 
- (modified) libc/src/__support/math/atanhf16.h (+1-1) 
- (modified) libc/src/__support/math/bf16subl.h (+1-1) 
- (modified) libc/src/__support/math/canonicalize.h (+1-1) 
- (modified) libc/src/__support/math/canonicalizebf16.h (+1-2) 
- (modified) libc/src/__support/math/canonicalizef.h (+1-1) 
- (modified) libc/src/__support/math/canonicalizef128.h (+1-2) 
- (modified) libc/src/__support/math/canonicalizef16.h (+1-1) 
- (modified) libc/src/__support/math/canonicalizel.h (+1-2) 
- (modified) libc/src/__support/math/cbrt.h (+3-3) 
- (modified) libc/src/__support/math/cbrtf.h (+1-1) 
- (modified) libc/src/__support/math/ceilbf16.h (+1-3) 
- (modified) libc/src/__support/math/ceilf128.h (+1-3) 
- (modified) libc/src/__support/math/copysignbf16.h (+1-1) 
- (modified) libc/src/__support/math/copysignf128.h (+1-1) 
- (modified) libc/src/__support/math/copysignl.h (+1-1) 
- (modified) libc/src/__support/math/cos.h (+1-1) 
- (modified) libc/src/__support/math/cosf.h (+2-2) 
- (modified) libc/src/__support/math/cosf16.h (+1-1) 
- (modified) libc/src/__support/math/coshf.h (+1-1) 
- (modified) libc/src/__support/math/coshf16.h (+1-1) 
- (modified) libc/src/__support/math/cospif.h (+1-1) 
- (modified) libc/src/__support/math/cospif16.h (+1-1) 
- (modified) libc/src/__support/math/ddivf128.h (+1-1) 
- (modified) libc/src/__support/math/ddivl.h (+1-1) 
- (modified) libc/src/__support/math/dmulf128.h (+1-1) 
- (modified) libc/src/__support/math/dmull.h (+1-1) 
- (modified) libc/src/__support/math/dsqrtf128.h (+1-1) 
- (modified) libc/src/__support/math/dsqrtl.h (+1-1) 
- (modified) libc/src/__support/math/erff.h (+1-1) 
- (modified) libc/src/__support/math/exp.h (+1-1) 
- (modified) libc/src/__support/math/exp10.h (+5-5) 
- (modified) libc/src/__support/math/exp10f.h (+1-1) 
- (modified) libc/src/__support/math/exp10f16.h (+1-1) 
- (modified) libc/src/__support/math/exp10f_utils.h (+1-1) 
- (modified) libc/src/__support/math/exp10m1f.h (+1-1) 
- (modified) libc/src/__support/math/exp10m1f16.h (+1-1) 
- (modified) libc/src/__support/math/exp2.h (+6-7) 
- (modified) libc/src/__support/math/exp2f.h (+1-1) 
- (modified) libc/src/__support/math/exp2f16.h (+1-1) 
- (modified) libc/src/__support/math/exp2m1f.h (+1-1) 
- (modified) libc/src/__support/math/exp2m1f16.h (+1-1) 
- (modified) libc/src/__support/math/exp_utils.h (+1-1) 
- (modified) libc/src/__support/math/expf.h (+1-1) 
- (modified) libc/src/__support/math/expf16.h (+1-1) 
- (modified) libc/src/__support/math/expm1.h (+5-5) 
- (modified) libc/src/__support/math/expm1f.h (+1-1) 
- (modified) libc/src/__support/math/expm1f16.h (+1-1) 
- (modified) libc/src/__support/math/expxf16_utils.h (+1-1) 
- (modified) libc/src/__support/math/f16add.h (+1-1) 
- (modified) libc/src/__support/math/f16addf.h (+1-1) 
- (modified) libc/src/__support/math/f16addf128.h (+1-1) 
- (modified) libc/src/__support/math/f16addl.h (+1-1) 
- (modified) libc/src/__support/math/f16sqrt.h (+1-1) 
- (modified) libc/src/__support/math/f16sqrtf.h (+1-1) 
- (modified) libc/src/__support/math/f16sqrtl.h (+1-1) 
- (modified) libc/src/__support/math/fabs.h (+1-1) 
- (modified) libc/src/__support/math/fabsbf16.h (+1-3) 
- (modified) libc/src/__support/math/fabsf.h (+1-1) 
- (modified) libc/src/__support/math/fabsf128.h (+1-3) 
- (modified) libc/src/__support/math/fabsf16.h (+1-1) 
- (modified) libc/src/__support/math/fabsl.h (+1-1) 
- (modified) libc/src/__support/math/fadd.h (+1-1) 
- (modified) libc/src/__support/math/faddf128.h (+1-1) 
- (modified) libc/src/__support/math/faddl.h (+1-1) 
- (modified) libc/src/__support/math/fdim.h (+1-1) 
- (modified) libc/src/__support/math/fdimbf16.h (+1-1) 
- (modified) libc/src/__support/math/fdimf.h (+1-1) 
- (modified) libc/src/__support/math/fdimf128.h (+1-1) 
- (modified) libc/src/__support/math/fdimf16.h (+1-1) 
- (modified) libc/src/__support/math/fdiml.h (+1-1) 
- (modified) libc/src/__support/math/fdiv.h (+1-1) 
- (modified) libc/src/__support/math/fdivf128.h (+1-1) 
- (modified) libc/src/__support/math/fdivl.h (+1-1) 
- (modified) libc/src/__support/math/floorbf16.h (+1-1) 
- (modified) libc/src/__support/math/floorf128.h (+1-1) 
- (modified) libc/src/__support/math/floorl.h (+1-1) 
- (modified) libc/src/__support/math/fmax.h (+1-1) 
- (modified) libc/src/__support/math/fmaxbf16.h (+1-1) 
- (modified) libc/src/__support/math/fmaxf128.h (+1-1) 
- (modified) libc/src/__support/math/fmaxf16.h (+1-1) 
- (modified) libc/src/__support/math/fmaximum.h (+1-1) 
- (modified) libc/src/__support/math/fmaximum_mag.h (+1-1) 
- (modified) libc/src/__support/math/fmaximum_mag_num.h (+1-1) 
- (modified) libc/src/__support/math/fmaximum_mag_numbf16.h (+1-2) 
- (modified) libc/src/__support/math/fmaximum_mag_numf.h (+1-1) 
- (modified) libc/src/__support/math/fmaximum_mag_numf128.h (+1-2) 
- (modified) libc/src/__support/math/fmaximum_mag_numf16.h (+1-1) 
- (modified) libc/src/__support/math/fmaximum_mag_numl.h (+2-2) 
- (modified) libc/src/__support/math/fmaximum_magbf16.h (+1-1) 
- (modified) libc/src/__support/math/fmaximum_magf.h (+1-1) 
- (modified) libc/src/__support/math/fmaximum_magf128.h (+1-1) 
- (modified) libc/src/__support/math/fmaximum_magf16.h (+1-1) 
- (modified) libc/src/__support/math/fmaximum_magl.h (+1-2) 
- (modified) libc/src/__support/math/fmaximum_num.h (+1-1) 
- (modified) libc/src/__support/math/fmaximum_numbf16.h (+1-1) 
- (modified) libc/src/__support/math/fmaximum_numf.h (+1-1) 
- (modified) libc/src/__support/math/fmaximum_numf128.h (+1-1) 
- (modified) libc/src/__support/math/fmaximum_numf16.h (+1-1) 
- (modified) libc/src/__support/math/fmaximum_numl.h (+1-2) 
- (modified) libc/src/__support/math/fmaximumbf16.h (+1-1) 
- (modified) libc/src/__support/math/fmaximumf.h (+1-1) 
- (modified) libc/src/__support/math/fmaximumf128.h (+1-1) 
- (modified) libc/src/__support/math/fmaximumf16.h (+1-1) 
- (modified) libc/src/__support/math/fmaximuml.h (+1-1) 
- (modified) libc/src/__support/math/fmaxl.h (+1-1) 
- (modified) libc/src/__support/math/fmin.h (+1-1) 
- (modified) libc/src/__support/math/fminbf16.h (+1-1) 
- (modified) libc/src/__support/math/fminf.h (+1-1) 
- (modified) libc/src/__support/math/fminf128.h (+1-1) 
- (modified) libc/src/__support/math/fminf16.h (+1-1) 
- (modified) libc/src/__support/math/fminimum.h (+1-1) 
- (modified) libc/src/__support/math/fminimum_mag.h (+1-1) 
- (modified) libc/src/__support/math/fminimum_mag_num.h (+1-1) 
- (modified) libc/src/__support/math/fminimum_mag_numbf16.h (+1-2) 
- (modified) libc/src/__support/math/fminimum_mag_numf.h (+1-1) 
- (modified) libc/src/__support/math/fminimum_mag_numf128.h (+1-2) 
- (modified) libc/src/__support/math/fminimum_mag_numf16.h (+1-1) 
- (modified) libc/src/__support/math/fminimum_mag_numl.h (+2-2) 
- (modified) libc/src/__support/math/fminimum_magbf16.h (+1-1) 
- (modified) libc/src/__support/math/fminimum_magf.h (+1-1) 
- (modified) libc/src/__support/math/fminimum_magf128.h (+1-1) 
- (modified) libc/src/__support/math/fminimum_magf16.h (+1-1) 
- (modified) libc/src/__support/math/fminimum_magl.h (+1-2) 
- (modified) libc/src/__support/math/fminimum_num.h (+1-1) 
- (modified) libc/src/__support/math/fminimum_numbf16.h (+1-1) 
- (modified) libc/src/__support/math/fminimum_numf.h (+1-1) 
- (modified) libc/src/__support/math/fminimum_numf128.h (+1-1) 
- (modified) libc/src/__support/math/fminimum_numf16.h (+1-1) 
- (modified) libc/src/__support/math/fminimum_numl.h (+1-2) 
- (modified) libc/src/__support/math/fminimumbf16.h (+1-1) 
- (modified) libc/src/__support/math/fminimumf.h (+1-1) 
- (modified) libc/src/__support/math/fminimumf128.h (+1-1) 
- (modified) libc/src/__support/math/fminimumf16.h (+1-1) 
- (modified) libc/src/__support/math/fminimuml.h (+1-1) 
- (modified) libc/src/__support/math/fminl.h (+1-1) 
- (modified) libc/src/__support/math/fmod.h (+1-1) 
- (modified) libc/src/__support/math/fmodbf16.h (+1-1) 
- (modified) libc/src/__support/math/fmodf.h (+1-1) 
- (modified) libc/src/__support/math/fmodf128.h (+1-1) 
- (modified) libc/src/__support/math/fmodf16.h (+1-1) 
- (modified) libc/src/__support/math/fmodl.h (+1-1) 
- (modified) libc/src/__support/math/fmulf128.h (+1-1) 
- (modified) libc/src/__support/math/fmull.h (+1-1) 
- (modified) libc/src/__support/math/frexp.h (+1-1) 
- (modified) libc/src/__support/math/frexpbf16.h (+1-1) 
- (modified) libc/src/__support/math/frexpf.h (+1-1) 
- (modified) libc/src/__support/math/frexpf128.h (+1-1) 
- (modified) libc/src/__support/math/frexpf16.h (+1-1) 
- (modified) libc/src/__support/math/frexpl.h (+1-1) 
- (modified) libc/src/__support/math/fromfp.h (+1-2) 
- (modified) libc/src/__support/math/fromfpbf16.h (+2-2) 
- (modified) libc/src/__support/math/fromfpf.h (+1-1) 
- (modified) libc/src/__support/math/fromfpf128.h (+2-2) 
- (modified) libc/src/__support/math/fromfpf16.h (+2-2) 
- (modified) libc/src/__support/math/fromfpl.h (+2-2) 
- (modified) libc/src/__support/math/fromfpx.h (+1-2) 
- (modified) libc/src/__support/math/fromfpxbf16.h (+2-2) 
- (modified) libc/src/__support/math/fromfpxf.h (+1-2) 
- (modified) libc/src/__support/math/fromfpxf128.h (+2-2) 
- (modified) libc/src/__support/math/fromfpxf16.h (+2-2) 
- (modified) libc/src/__support/math/fromfpxl.h (+2-2) 
- (modified) libc/src/__support/math/fsqrt.h (+1-3) 
- (modified) libc/src/__support/math/fsqrtf128.h (+1-1) 
- (modified) libc/src/__support/math/fsqrtl.h (+1-1) 
- (modified) libc/src/__support/math/fsub.h (+1-1) 
- (modified) libc/src/__support/math/fsubf128.h (+1-1) 
- (modified) libc/src/__support/math/fsubl.h (+1-1) 
- (modified) libc/src/__support/math/getpayload.h (+1-1) 
- (modified) libc/src/__support/math/getpayloadbf16.h (+1-1) 
- (modified) libc/src/__support/math/getpayloadf.h (+1-1) 
- (modified) libc/src/__support/math/getpayloadf128.h (+1-1) 
- (modified) libc/src/__support/math/getpayloadf16.h (+1-1) 
- (modified) libc/src/__support/math/getpayloadl.h (+1-1) 
- (modified) libc/src/__support/math/ilogb.h (+1-3) 
- (modified) libc/src/__support/math/ilogbbf16.h (+1-1) 
- (modified) libc/src/__support/math/ilogbf.h (+1-3) 
- (modified) libc/src/__support/math/ilogbf128.h (+1-1) 
- (modified) libc/src/__support/math/ilogbf16.h (+1-1) 
- (modified) libc/src/__support/math/ilogbl.h (+1-1) 
- (modified) libc/src/__support/math/iscanonical.h (+1-1) 
- (modified) libc/src/__support/math/iscanonicalbf16.h (+1-1) 
- (modified) libc/src/__support/math/iscanonicalf.h (+1-1) 
- (modified) libc/src/__support/math/iscanonicalf128.h (+1-1) 
- (modified) libc/src/__support/math/iscanonicalf16.h (+1-1) 
- (modified) libc/src/__support/math/iscanonicall.h (+1-1) 
- (modified) libc/src/__support/math/issignaling.h (+1-1) 
- (modified) libc/src/__support/math/issignalingbf16.h (+1-1) 
- (modified) libc/src/__support/math/issignalingf.h (+1-1) 
- (modified) libc/src/__support/math/issignalingf128.h (+1-1) 
- (modified) libc/src/__support/math/issignalingf16.h (+1-1) 
- (modified) libc/src/__support/math/issignalingl.h (+1-1) 
- (modified) libc/src/__support/math/ldexp.h (+1-1) 
- (modified) libc/src/__support/math/ldexpbf16.h (+1-1) 
- (modified) libc/src/__support/math/ldexpf.h (+1-1) 
- (modified) libc/src/__support/math/ldexpf128.h (+1-1) 
- (modified) libc/src/__support/math/ldexpf16.h (+1-1) 
- (modified) libc/src/__support/math/ldexpl.h (+1-1) 
- (modified) libc/src/__support/math/llogb.h (+1-3) 
- (modified) libc/src/__support/math/llogbbf16.h (+1-1) 
- (modified) libc/src/__support/math/llogbf.h (+1-3) 
- (modified) libc/src/__support/math/llogbf128.h (+1-1) 
- (modified) libc/src/__support/math/llogbf16.h (+1-1) 
- (modified) libc/src/__support/math/llogbl.h (+1-1) 
- (modified) libc/src/__support/math/llrint.h (+1-1) 
- (modified) libc/src/__support/math/llrintbf16.h (+1-1) 
- (modified) libc/src/__support/math/llrintf.h (+1-1) 
- (modified) libc/src/__support/math/llrintf128.h (+1-1) 
- (modified) libc/src/__support/math/llrintf16.h (+1-1) 
- (modified) libc/src/__support/math/llrintl.h (+1-1) 
- (modified) libc/src/__support/math/llround.h (+1-1) 
- (modified) libc/src/__support/math/llroundbf16.h (+1-1) 
- (modified) libc/src/__support/math/llroundf.h (+1-1) 
- (modified) libc/src/__support/math/llroundf128.h (+1-1) 
- (modified) libc/src/__support/math/llroundf16.h (+1-1) 
- (modified) libc/src/__support/math/llroundl.h (+1-1) 
- (modified) libc/src/__support/math/log.h (+6-6) 
- (modified) libc/src/__support/math/log10.h (+6-6) 
- (modified) libc/src/__support/math/log1p.h (+8-8) 
- (modified) libc/src/__support/math/log2.h (+2-2) 
- (modified) libc/src/__support/math/log_range_reduction.h (+1-1) 
- (modified) libc/src/__support/math/logb.h (+1-1) 
- (modified) libc/src/__support/math/logbbf16.h (+1-3) 
- (modified) libc/src/__support/math/logbf.h (+1-1) 
- (modified) libc/src/__support/math/logbf128.h (+1-3) 
- (modified) libc/src/__support/math/logbf16.h (+1-3) 
- (modified) libc/src/__support/math/logbl.h (+1-1) 
- (modified) libc/src/__support/math/lrint.h (+1-1) 
- (modified) libc/src/__support/math/lrintbf16.h (+1-1) 
- (modified) libc/src/__support/math/lrintf.h (+1-1) 
- (modified) libc/src/__support/math/lrintf128.h (+1-1) 
- (modified) libc/src/__support/math/lrintf16.h (+1-1) 
- (modified) libc/src/__support/math/lrintl.h (+1-1) 
- (modified) libc/src/__support/math/lround.h (+1-1) 
- (modified) libc/src/__support/math/lroundbf16.h (+1-1) 
- (modified) libc/src/__support/math/lroundf.h (+1-1) 
- (modified) libc/src/__support/math/lroundf128.h (+1-1) 
- (modified) libc/src/__support/math/lroundf16.h (+1-1) 
- (modified) libc/src/__support/math/lroundl.h (+1-1) 
- (modified) libc/src/__support/math/modf.h (+1-1) 
- (modified) libc/src/__support/math/modfbf16.h (+1-1) 
- (modified) libc/src/__support/math/modff.h (+1-1) 
- (modified) libc/src/__support/math/modff128.h (+1-1) 
- (modified) libc/src/__support/math/modff16.h (+1-1) 
- (modified) libc/src/__support/math/modfl.h (+1-1) 
- (modified) libc/src/__support/math/nan.h (+1-1) 
- (modified) libc/src/__support/math/nanbf16.h (+1-1) 
- (modified) libc/src/__support/math/nanf.h (+1-1) 
- (modified) libc/src/__support/math/nanf128.h (+1-1) 
- (modified) libc/src/__support/math/nanf16.h (+1-1) 
- (modified) libc/src/__support/math/nanl.h (+1-1) 
- (modified) libc/src/__support/math/nearbyint.h (+1-1) 
- (modified) libc/src/__support/math/nearbyintbf16.h (+1-1) 
- (modified) libc/src/__support/math/nearbyintf.h (+1-1) 
- (modified) libc/src/__support/math/nearbyintf128.h (+1-1) 
- (modified) libc/src/__support/math/nearbyintf16.h (+1-1) 
- (modified) libc/src/__support/math/nearbyintl.h (+1-1) 
- (modified) libc/src/__support/math/nextafter.h (+1-1) 
- (modified) libc/src/__support/math/nextafterbf16.h (+1-1) 
- (modified) libc/src/__support/math/nextafterf.h (+1-1) 
- (modified) libc/src/__support/math/nextafterf128.h (+1-1) 
- (modified) libc/src/__support/math/nextafterf16.h (+1-1) 
- (modified) libc/src/__support/math/nextafterl.h (+1-2) 
- (modified) libc/src/__support/math/nextdown.h (+1-1) 
- (modified) libc/src/__support/math/nextdownbf16.h (+1-1) 
- (modified) libc/src/__support/math/nextdownf.h (+1-1) 
- (modified) libc/src/__support/math/nextdownf128.h (+1-1) 
- (modified) libc/src/__support/math/nextdownf16.h (+1-1) 
- (modified) libc/src/__support/math/nextdownl.h (+1-1) 
- (modified) libc/src/__support/math/nextup.h (+1-1) 
- (modified) libc/src/__support/math/nextupbf16.h (+1-1) 
- (modified) libc/src/__support/math/nextupf.h (+1-1) 
- (modified) libc/src/__support/math/nextupf128.h (+1-1) 
- (modified) libc/src/__support/math/nextupf16.h (+1-1) 
- (modified) libc/src/__support/math/nextupl.h (+1-1) 
- (modified) libc/src/__support/math/pow.h (+2-2) 
- (modified) libc/src/__support/math/powf.h (+3-3) 
- (modified) libc/src/__support/math/range_reduction_double_common.h (+3-3) 
- (modified) libc/src/__support/math/remainder.h (+1-1) 
- (modified) libc/src/__support/math/remainderbf16.h (+1-1) 
- (modified) libc/src/__support/math/remainderf.h (+1-1) 
- (modified) libc/src/__support/math/remainderf128.h (+1-1) 
- (modified) libc/src/__support/math/remainderf16.h (+1-1) 
- (modified) libc/src/__support/math/remainderl.h (+1-2) 
- (modified) libc/src/__support/math/remquo.h (+1-1) 
- (modified) libc/src/__support/math/remquobf16.h (+1-2) 
- (modified) libc/src/__support/math/remquof.h (+1-1) 
- (modified) libc/src/__support/math/remquof128.h (+1-2) 
- (modified) libc/src/__support/math/remquof16.h (+1-1) 
- (modified) libc/src/__support/math/remquol.h (+2-2) 
- (modified) libc/src/__support/math/rintbf16.h (+1-1) 
- (modified) libc/src/__support/math/rintf128.h (+1-1) 
- (modified) libc/src/__support/math/rintl.h (+1-1) 
- (modified) libc/src/__support/math/roundbf16.h (+1-1) 
- (modified) libc/src/__support/math/roundevenbf16.h (+1-1) 
- (modified) libc/src/__support/math/roundevenf128.h (+1-1) 
- (modified) libc/src/__support/math/roundevenl.h (+1-1) 
- (modified) libc/src/__support/math/roundf128.h (+1-1) 
- (modified) libc/src/__support/math/roundl.h (+1-1) 
- (modified) libc/src/__support/math/rsqrtf.h (+2-2) 
- (modified) libc/src/__support/math/rsqrtf16.h (+1-1) 
- (modified) libc/src/__support/math/scalbln.h (+1-1) 
- (modified) libc/src/__support/math/scalblnbf16.h (+1-1) 
- (modified) libc/src/__support/math/scalblnf.h (+1-1) 
- (modified) libc/src/__support/math/scalblnf128.h (+1-1) 
- (modified) libc/src/__support/math/scalblnf16.h (+1-1) 
- (modified) libc/src/__support/math/scalblnl.h (+1-1) 
- (modified) libc/src/__support/math/scalbn.h (+1-1) 
- (modified) libc/src/__support/math/scalbnbf16.h (+1-1) 
- (modified) libc/src/__support/math/scalbnf.h (+1-1) 
- (modified) libc/src/__support/math/scalbnf128.h (+1-1) 
- (modified) libc/src/__support/math/scalbnf16.h (+1-1) 
- (modified) libc/src/__support/math/scalbnl.h (+1-1) 
- (modified) libc/src/__support/math/setpayload.h (+1-1) 
- (modified) libc/src/__support/math/setpayloadbf16.h (+1-1) 
- (modified) libc/src/__support/math/setpayloadf.h (+1-1) 
- (modified) libc/src/__support/math/setpayloadf128.h (+1-1) 
- (modified) libc/src/__support/math/setpayloadf16.h (+1-1) 
- (modified) libc/src/__support/math/setpayloadl.h (+1-1) 
- (modified) libc/src/__support/math/sin.h (+1-1) 
- (modified) libc/src/__support/math/sincos_eval.h (+2-2) 
- (modified) libc/src/__support/math/sinhf.h (+1-1) 
- (modified) libc/src/__support/math/sinhf16.h (+1-1) 
- (modified) libc/src/__support/math/sqrtf128.h (+10-13) 
- (modified) libc/src/__support/math/sqrtf16.h (+1-1) 
- (modified) libc/src/__support/math/tan.h (+2-2) 
- (modified) libc/src/__support/math/totalorder.h (+1-1) 


``````````diff
diff --git a/libc/src/__support/CPP/bit.h b/libc/src/__support/CPP/bit.h
index 44f68dad8c5e9..6208e8a14ff8e 100644
--- a/libc/src/__support/CPP/bit.h
+++ b/libc/src/__support/CPP/bit.h
@@ -44,14 +44,15 @@ LIBC_INLINE constexpr void inline_copy(const char *from, char *to) {
 // This implementation of bit_cast requires trivially-constructible To, to avoid
 // UB in the implementation.
 template <typename To, typename From>
-LIBC_INLINE LIBC_CONSTEXPR static cpp::enable_if_t<
+LIBC_INLINE static constexpr cpp::enable_if_t<
     (sizeof(To) == sizeof(From)) &&
         cpp::is_trivially_constructible<To>::value &&
         cpp::is_trivially_copyable<To>::value &&
         cpp::is_trivially_copyable<From>::value,
     To>
 bit_cast(const From &from) {
-#if LIBC_HAS_BUILTIN_BIT_CAST
+#if __has_builtin(__builtin_bit_cast) || defined(LIBC_COMPILER_IS_MSVC) ||     \
+    defined(LIBC_HAS_CONSTANT_EVALUATION)
   return __builtin_bit_cast(To, from);
 #else
   To to{};
diff --git a/libc/src/__support/FPUtil/FPBits.h b/libc/src/__support/FPUtil/FPBits.h
index 53f5bb47cd605..7028fd4f38950 100644
--- a/libc/src/__support/FPUtil/FPBits.h
+++ b/libc/src/__support/FPUtil/FPBits.h
@@ -835,8 +835,7 @@ struct FPBits final : public internal::FPRepImpl<get_fp_type<T>(), FPBits<T>> {
   // Constructors.
   LIBC_INLINE constexpr FPBits() = default;
 
-  template <typename XType>
-  LIBC_INLINE LIBC_CONSTEXPR explicit FPBits(XType x) {
+  template <typename XType> LIBC_INLINE constexpr explicit FPBits(XType x) {
     using Unqual = typename cpp::remove_cv_t<XType>;
     if constexpr (cpp::is_same_v<Unqual, T>) {
       UP::bits = cpp::bit_cast<StorageType>(x);
@@ -850,9 +849,7 @@ struct FPBits final : public internal::FPRepImpl<get_fp_type<T>(), FPBits<T>> {
   }
 
   // Floating-point conversions.
-  LIBC_INLINE LIBC_CONSTEXPR T get_val() const {
-    return cpp::bit_cast<T>(UP::bits);
-  }
+  LIBC_INLINE constexpr T get_val() const { return cpp::bit_cast<T>(UP::bits); }
 };
 
 } // namespace fputil
diff --git a/libc/src/__support/FPUtil/NormalFloat.h b/libc/src/__support/FPUtil/NormalFloat.h
index e12ade366b109..5123a3e217f72 100644
--- a/libc/src/__support/FPUtil/NormalFloat.h
+++ b/libc/src/__support/FPUtil/NormalFloat.h
@@ -46,7 +46,7 @@ template <typename T> struct NormalFloat {
 
   Sign sign = Sign::POS;
 
-  LIBC_INLINE LIBC_CONSTEXPR NormalFloat(Sign s, int32_t e, StorageType m)
+  LIBC_INLINE constexpr NormalFloat(Sign s, int32_t e, StorageType m)
       : exponent(e), mantissa(m), sign(s) {
     if (mantissa >= ONE)
       return;
@@ -56,18 +56,18 @@ template <typename T> struct NormalFloat {
     exponent -= normalization_shift;
   }
 
-  LIBC_INLINE LIBC_CONSTEXPR explicit NormalFloat(T x) {
+  LIBC_INLINE constexpr explicit NormalFloat(T x) {
     init_from_bits(FPBits<T>(x));
   }
 
-  LIBC_INLINE LIBC_CONSTEXPR explicit NormalFloat(FPBits<T> bits) {
+  LIBC_INLINE constexpr explicit NormalFloat(FPBits<T> bits) {
     init_from_bits(bits);
   }
 
   // Compares this normalized number with another normalized number.
   // Returns -1 is this number is less than |other|, 0 if this number is equal
   // to |other|, and 1 if this number is greater than |other|.
-  LIBC_INLINE LIBC_CONSTEXPR int cmp(const NormalFloat<T> &other) const {
+  LIBC_INLINE constexpr int cmp(const NormalFloat<T> &other) const {
     const int result = sign.is_neg() ? -1 : 1;
     if (sign != other.sign)
       return result;
@@ -89,13 +89,13 @@ template <typename T> struct NormalFloat {
   // Returns a new normalized floating point number which is equal in value
   // to this number multiplied by 2^e. That is:
   //     new = this *  2^e
-  LIBC_INLINE LIBC_CONSTEXPR NormalFloat<T> mul2(int e) const {
+  LIBC_INLINE constexpr NormalFloat<T> mul2(int e) const {
     NormalFloat<T> result = *this;
     result.exponent += e;
     return result;
   }
 
-  LIBC_INLINE LIBC_CONSTEXPR operator T() const {
+  LIBC_INLINE constexpr operator T() const {
     int biased_exponent = exponent + FPBits<T>::EXP_BIAS;
     // Max exponent is of the form 0xFF...E. That is why -2 and not -1.
     constexpr int MAX_EXPONENT_VALUE = (1 << FPBits<T>::EXP_LEN) - 2;
@@ -148,7 +148,7 @@ template <typename T> struct NormalFloat {
   }
 
 private:
-  LIBC_INLINE LIBC_CONSTEXPR void init_from_bits(FPBits<T> bits) {
+  LIBC_INLINE constexpr void init_from_bits(FPBits<T> bits) {
     sign = bits.sign();
 
     if (bits.is_inf_or_nan() || bits.is_zero()) {
@@ -170,8 +170,7 @@ template <typename T> struct NormalFloat {
     }
   }
 
-  LIBC_INLINE LIBC_CONSTEXPR unsigned
-  evaluate_normalization_shift(StorageType m) {
+  LIBC_INLINE constexpr unsigned evaluate_normalization_shift(StorageType m) {
     unsigned shift = 0;
     for (; (ONE & m) == 0 && (shift < FPBits<T>::FRACTION_LEN);
          m <<= 1, ++shift)
@@ -182,7 +181,7 @@ template <typename T> struct NormalFloat {
 
 #ifdef LIBC_TYPES_LONG_DOUBLE_IS_X86_FLOAT80
 template <>
-LIBC_INLINE LIBC_CONSTEXPR void
+LIBC_INLINE constexpr void
 NormalFloat<long double>::init_from_bits(FPBits<long double> bits) {
   sign = bits.sign();
 
@@ -218,8 +217,7 @@ NormalFloat<long double>::init_from_bits(FPBits<long double> bits) {
 }
 
 template <>
-LIBC_INLINE LIBC_CONSTEXPR NormalFloat<long double>::operator long double()
-    const {
+LIBC_INLINE constexpr NormalFloat<long double>::operator long double() const {
   using LDBits = FPBits<long double>;
   int biased_exponent = exponent + LDBits::EXP_BIAS;
   // Max exponent is of the form 0xFF...E. That is why -2 and not -1.
diff --git a/libc/src/__support/FPUtil/bfloat16.h b/libc/src/__support/FPUtil/bfloat16.h
index d1acc948e9c47..5c8f3b7e6c77a 100644
--- a/libc/src/__support/FPUtil/bfloat16.h
+++ b/libc/src/__support/FPUtil/bfloat16.h
@@ -30,7 +30,7 @@ struct BFloat16 {
   LIBC_INLINE BFloat16() = default;
 
   template <typename T>
-  LIBC_INLINE LIBC_CONSTEXPR explicit BFloat16(T value)
+  LIBC_INLINE constexpr explicit BFloat16(T value)
       : bits(static_cast<uint16_t>(0U)) {
     if constexpr (cpp::is_floating_point_v<T>) {
       bits = fputil::cast<bfloat16>(value).bits;
@@ -58,63 +58,63 @@ struct BFloat16 {
   template <cpp::enable_if_t<fputil::get_fp_type<float>() ==
                                  fputil::FPType::IEEE754_Binary32,
                              int> = 0>
-  LIBC_INLINE LIBC_CONSTEXPR operator float() const {
+  LIBC_INLINE constexpr operator float() const {
     uint32_t x_bits = static_cast<uint32_t>(bits) << 16U;
     return cpp::bit_cast<float>(x_bits);
   }
 
   template <typename T, cpp::enable_if_t<cpp::is_integral_v<T>, int> = 0>
-  LIBC_INLINE LIBC_CONSTEXPR explicit operator T() const {
+  LIBC_INLINE constexpr explicit operator T() const {
     return static_cast<T>(static_cast<float>(*this));
   }
 
-  LIBC_INLINE LIBC_CONSTEXPR bool operator==(BFloat16 other) const {
+  LIBC_INLINE constexpr bool operator==(BFloat16 other) const {
     return fputil::equals(*this, other);
   }
 
-  LIBC_INLINE LIBC_CONSTEXPR bool operator!=(BFloat16 other) const {
+  LIBC_INLINE constexpr bool operator!=(BFloat16 other) const {
     return !fputil::equals(*this, other);
   }
 
-  LIBC_INLINE LIBC_CONSTEXPR bool operator<(BFloat16 other) const {
+  LIBC_INLINE constexpr bool operator<(BFloat16 other) const {
     return fputil::less_than(*this, other);
   }
 
-  LIBC_INLINE LIBC_CONSTEXPR bool operator<=(BFloat16 other) const {
+  LIBC_INLINE constexpr bool operator<=(BFloat16 other) const {
     return fputil::less_than_or_equals(*this, other);
   }
 
-  LIBC_INLINE LIBC_CONSTEXPR bool operator>(BFloat16 other) const {
+  LIBC_INLINE constexpr bool operator>(BFloat16 other) const {
     return fputil::greater_than(*this, other);
   }
 
-  LIBC_INLINE LIBC_CONSTEXPR bool operator>=(BFloat16 other) const {
+  LIBC_INLINE constexpr bool operator>=(BFloat16 other) const {
     return fputil::greater_than_or_equals(*this, other);
   }
 
-  LIBC_INLINE LIBC_CONSTEXPR BFloat16 operator-() const {
+  LIBC_INLINE constexpr BFloat16 operator-() const {
     fputil::FPBits<bfloat16> result(*this);
     result.set_sign(result.is_pos() ? Sign::NEG : Sign::POS);
     return result.get_val();
   }
 
-  LIBC_INLINE LIBC_CONSTEXPR BFloat16 operator+(BFloat16 other) const {
+  LIBC_INLINE constexpr BFloat16 operator+(BFloat16 other) const {
     return fputil::generic::add<BFloat16>(*this, other);
   }
 
-  LIBC_INLINE LIBC_CONSTEXPR BFloat16 operator-(BFloat16 other) const {
+  LIBC_INLINE constexpr BFloat16 operator-(BFloat16 other) const {
     return fputil::generic::sub<BFloat16>(*this, other);
   }
 
-  LIBC_INLINE LIBC_CONSTEXPR BFloat16 operator*(BFloat16 other) const {
+  LIBC_INLINE constexpr BFloat16 operator*(BFloat16 other) const {
     return fputil::generic::mul<bfloat16>(*this, other);
   }
 
-  LIBC_INLINE LIBC_CONSTEXPR BFloat16 operator/(BFloat16 other) const {
+  LIBC_INLINE constexpr BFloat16 operator/(BFloat16 other) const {
     return fputil::generic::div<bfloat16>(*this, other);
   }
 
-  LIBC_INLINE LIBC_CONSTEXPR BFloat16 &operator*=(const BFloat16 &other) {
+  LIBC_INLINE constexpr BFloat16 &operator*=(const BFloat16 &other) {
     *this = *this * other;
     return *this;
   }
diff --git a/libc/src/__support/FPUtil/cast.h b/libc/src/__support/FPUtil/cast.h
index 8fbc2756a4181..54c80e862523a 100644
--- a/libc/src/__support/FPUtil/cast.h
+++ b/libc/src/__support/FPUtil/cast.h
@@ -51,9 +51,8 @@ cast(InType x) {
         }
 
         InStorageType x_mant = x_bits.get_mantissa();
-        if constexpr (InFPBits::FRACTION_LEN > OutFPBits::FRACTION_LEN) {
+        if (InFPBits::FRACTION_LEN > OutFPBits::FRACTION_LEN)
           x_mant >>= InFPBits::FRACTION_LEN - OutFPBits::FRACTION_LEN;
-        }
         return OutFPBits::quiet_nan(x_bits.sign(),
                                     static_cast<OutStorageType>(x_mant))
             .get_val();
diff --git a/libc/src/__support/FPUtil/generic/FMA.h b/libc/src/__support/FPUtil/generic/FMA.h
index 8dc98d35949a6..7b46978d0c8af 100644
--- a/libc/src/__support/FPUtil/generic/FMA.h
+++ b/libc/src/__support/FPUtil/generic/FMA.h
@@ -168,7 +168,7 @@ fma(InType x, InType y, InType z) {
   constexpr InStorageType IMPLICIT_MASK =
       InFPBits::SIG_MASK - InFPBits::FRACTION_MASK;
 
-  LIBC_CONSTEXPR InType DENORMAL_SCALING =
+  constexpr InType DENORMAL_SCALING =
       InFPBits::create_value(
           Sign::POS, InFPBits::FRACTION_LEN + InFPBits::EXP_BIAS, IMPLICIT_MASK)
           .get_val();
diff --git a/libc/src/__support/FPUtil/generic/sqrt.h b/libc/src/__support/FPUtil/generic/sqrt.h
index 3f47ddda8aa7b..4e452a87050b1 100644
--- a/libc/src/__support/FPUtil/generic/sqrt.h
+++ b/libc/src/__support/FPUtil/generic/sqrt.h
@@ -92,7 +92,7 @@ sqrt(InType x) {
         DyadicFloat<cpp::bit_ceil(static_cast<size_t>(InFPBits::STORAGE_LEN))>;
 
     constexpr InStorageType ONE = InStorageType(1) << InFPBits::FRACTION_LEN;
-    LIBC_CONSTEXPR auto FLT_NAN = OutFPBits::quiet_nan().get_val();
+    constexpr auto FLT_NAN = OutFPBits::quiet_nan().get_val();
 
     InFPBits bits(x);
 
diff --git a/libc/src/__support/FPUtil/generic/sqrt_80_bit_long_double.h b/libc/src/__support/FPUtil/generic/sqrt_80_bit_long_double.h
index 437d5d3bc9e25..0ba836d17a085 100644
--- a/libc/src/__support/FPUtil/generic/sqrt_80_bit_long_double.h
+++ b/libc/src/__support/FPUtil/generic/sqrt_80_bit_long_double.h
@@ -41,7 +41,7 @@ LIBC_INLINE long double sqrt(long double x) {
   using LDBits = FPBits<long double>;
   using StorageType = typename LDBits::StorageType;
   constexpr StorageType ONE = StorageType(1) << int(LDBits::FRACTION_LEN);
-  LIBC_CONSTEXPR auto LDNAN = LDBits::quiet_nan().get_val();
+  constexpr auto LDNAN = LDBits::quiet_nan().get_val();
 
   LDBits bits(x);
 
diff --git a/libc/src/__support/FPUtil/x86_64/NextAfterLongDouble.h b/libc/src/__support/FPUtil/x86_64/NextAfterLongDouble.h
index 0e553c61bdd7a..aa9f4a5e39c2d 100644
--- a/libc/src/__support/FPUtil/x86_64/NextAfterLongDouble.h
+++ b/libc/src/__support/FPUtil/x86_64/NextAfterLongDouble.h
@@ -24,8 +24,7 @@
 namespace LIBC_NAMESPACE_DECL {
 namespace fputil {
 
-LIBC_INLINE LIBC_CONSTEXPR long double nextafter(long double from,
-                                                 long double to) {
+LIBC_INLINE constexpr long double nextafter(long double from, long double to) {
   using FPBits = FPBits<long double>;
   FPBits from_bits(from);
   if (from_bits.is_nan())
diff --git a/libc/src/__support/big_int.h b/libc/src/__support/big_int.h
index 747fb041d08a7..a6dcff27ca167 100644
--- a/libc/src/__support/big_int.h
+++ b/libc/src/__support/big_int.h
@@ -46,11 +46,11 @@ template <typename T> using half_width_t = typename half_width<T>::type;
 template <typename T> struct DoubleWide final : cpp::array<T, 2> {
   using UP = cpp::array<T, 2>;
   using UP::UP;
-  LIBC_INLINE LIBC_CONSTEXPR DoubleWide(T lo, T hi) : UP({lo, hi}) {}
+  LIBC_INLINE constexpr DoubleWide(T lo, T hi) : UP({lo, hi}) {}
 };
 
 // Converts an unsigned value into a DoubleWide<half_width_t<T>>.
-template <typename T> LIBC_INLINE LIBC_CONSTEXPR auto split(T value) {
+template <typename T> LIBC_INLINE constexpr auto split(T value) {
   static_assert(cpp::is_unsigned_v<T>);
   using half_type = half_width_t<T>;
   return DoubleWide<half_type>(
@@ -59,27 +59,25 @@ template <typename T> LIBC_INLINE LIBC_CONSTEXPR auto split(T value) {
 }
 
 // The low part of a DoubleWide value.
-template <typename T>
-LIBC_INLINE LIBC_CONSTEXPR T lo(const DoubleWide<T> &value) {
+template <typename T> LIBC_INLINE constexpr T lo(const DoubleWide<T> &value) {
   return value[0];
 }
 // The high part of a DoubleWide value.
-template <typename T>
-LIBC_INLINE LIBC_CONSTEXPR T hi(const DoubleWide<T> &value) {
+template <typename T> LIBC_INLINE constexpr T hi(const DoubleWide<T> &value) {
   return value[1];
 }
 // The low part of an unsigned value.
-template <typename T> LIBC_INLINE LIBC_CONSTEXPR half_width_t<T> lo(T value) {
+template <typename T> LIBC_INLINE constexpr half_width_t<T> lo(T value) {
   return lo(split(value));
 }
 // The high part of an unsigned value.
-template <typename T> LIBC_INLINE LIBC_CONSTEXPR half_width_t<T> hi(T value) {
+template <typename T> LIBC_INLINE constexpr half_width_t<T> hi(T value) {
   return hi(split(value));
 }
 
 // Returns 'a' times 'b' in a DoubleWide<word>. Cannot overflow by construction.
 template <typename word>
-LIBC_INLINE LIBC_CONSTEXPR DoubleWide<word> mul2(word a, word b) {
+LIBC_INLINE constexpr DoubleWide<word> mul2(word a, word b) {
   if constexpr (cpp::is_same_v<word, uint8_t>) {
     return split<uint16_t>(uint16_t(a) * uint16_t(b));
   } else if constexpr (cpp::is_same_v<word, uint16_t>) {
@@ -136,9 +134,9 @@ LIBC_INLINE LIBC_CONSTEXPR DoubleWide<word> mul2(word a, word b) {
 
 // In-place 'dst op= rhs' with operation with carry propagation. Returns carry.
 template <typename Function, typename word, size_t N, size_t M>
-LIBC_INLINE LIBC_CONSTEXPR word inplace_binop(Function op_with_carry,
-                                              cpp::array<word, N> &dst,
-                                              const cpp::array<word, M> &rhs) {
+LIBC_INLINE constexpr word inplace_binop(Function op_with_carry,
+                                         cpp::array<word, N> &dst,
+                                         const cpp::array<word, M> &rhs) {
   static_assert(N >= M);
   word carry_out = 0;
   for (size_t i = 0; i < N; ++i) {
@@ -155,23 +153,23 @@ LIBC_INLINE LIBC_CONSTEXPR word inplace_binop(Function op_with_carry,
 
 // In-place addition. Returns carry.
 template <typename word, size_t N, size_t M>
-LIBC_INLINE LIBC_CONSTEXPR word add_with_carry(cpp::array<word, N> &dst,
-                                               const cpp::array<word, M> &rhs) {
+LIBC_INLINE constexpr word add_with_carry(cpp::array<word, N> &dst,
+                                          const cpp::array<word, M> &rhs) {
   return inplace_binop(LIBC_NAMESPACE::add_with_carry<word>, dst, rhs);
 }
 
 // In-place subtraction. Returns borrow.
 template <typename word, size_t N, size_t M>
-LIBC_INLINE LIBC_CONSTEXPR word
-sub_with_borrow(cpp::array<word, N> &dst, const cpp::array<word, M> &rhs) {
+LIBC_INLINE constexpr word sub_with_borrow(cpp::array<word, N> &dst,
+                                           const cpp::array<word, M> &rhs) {
   return inplace_binop(LIBC_NAMESPACE::sub_with_borrow<word>, dst, rhs);
 }
 
 // In-place multiply-add. Returns carry.
 // i.e., 'dst += b * c'
 template <typename word, size_t N>
-LIBC_INLINE LIBC_CONSTEXPR word mul_add_with_carry(cpp::array<word, N> &dst,
-                                                   word b, word c) {
+LIBC_INLINE constexpr word mul_add_with_carry(cpp::array<word, N> &dst, word b,
+                                              word c) {
   return add_with_carry(dst, mul2(b, c));
 }
 
@@ -179,21 +177,21 @@ LIBC_INLINE LIBC_CONSTEXPR word mul_add_with_carry(cpp::array<word, N> &dst,
 // computations.
 template <typename T> struct Accumulator final : cpp::array<T, 2> {
   using UP = cpp::array<T, 2>;
-  LIBC_INLINE LIBC_CONSTEXPR Accumulator() : UP({0, 0}) {}
-  LIBC_INLINE LIBC_CONSTEXPR T advance(T carry_in) {
+  LIBC_INLINE constexpr Accumulator() : UP({0, 0}) {}
+  LIBC_INLINE constexpr T advance(T carry_in) {
     auto result = UP::front();
     UP::front() = UP::back();
     UP::back() = carry_in;
     return result;
   }
-  LIBC_INLINE LIBC_CONSTEXPR T sum() const { return UP::front(); }
-  LIBC_INLINE LIBC_CONSTEXPR T carry() const { return UP::back(); }
+  LIBC_INLINE constexpr T sum() const { return UP::front(); }
+  LIBC_INLINE constexpr T carry() const { return UP::back(); }
 };
 
 // In-place multiplication by a single word. Returns carry.
 template <typename word, size_t N>
-LIBC_INLINE LIBC_CONSTEXPR word
-scalar_multiply_with_carry(cpp::array<word, N> &dst, word x) {
+LIBC_INLINE constexpr word scalar_multiply_with_carry(cpp::array<word, N> &dst,
+                                                      word x) {
   Accumulator<word> acc;
   for (auto &val : dst) {
     const word carry = mul_add_with_carry(acc, val, x);
@@ -207,9 +205,9 @@ scalar_multiply_with_carry(cpp::array<word, N> &dst, word x) {
 // https://stackoverflow.com/a/20793834
 // https://pages.cs.wisc.edu/%7Emarkhill/cs354/Fall2008/beyond354/int.mult.html
 template <typename word, size_t O, size_t M, size_t N>
-LIBC_INLINE LIBC_CONSTEXPR word
-multiply_with_carry(cpp::array<word, O> &dst, const cpp::array<word, M> &lhs,
-                    const cpp::array<word, N> &rhs) {
+LIBC_INLINE constexpr word multiply_with_carry(cpp::array<word, O> &dst,
+                                               const cpp::array<word, M> &lhs,
+                                               const cpp::array<word, N> &rhs) {
   static_assert(O >= M + N);
   Accumulator<word> acc;
   for (size_t i = 0; i < O; ++i) {
@@ -224,9 +222,9 @@ multiply_with_carry(cpp::array<word, O> &dst, const cpp::array<word, M> &lhs,
 }
 
 template <typename word, size_t N>
-LIBC_INLINE LIBC_CONSTEXPR void quick_mul_hi(cpp::array<word, N> &dst,
-                                             const cpp::array<word, N> &lhs,
-                                             const cpp::array<word, N> &rhs) {
+LIBC_INLINE constexpr void quick_mul_hi(cpp::array<word, N> &dst,
+                                        const cpp::array<word, N> &lhs,
+                                        const cpp::array<word, N> &rhs) {
   Accumulator<word> acc;
   word carry = 0;
   // First round of accumulation for those at N - 1 in the full product.
@@ -243,7 +241,7 @@ LIBC_INLINE LIBC_CONSTEXPR void quick_mul_hi(cpp::array<word, N> &dst,
 }
 
 template <typename word, size_t N>
-LIBC_INLINE LIBC_CONSTEXPR bool is_negative(const cpp::array<word, N> &array) {
+LIBC_INLINE constexpr bool is_negative(const cpp::array<word, N> &array) {
   using signed_word = cpp::make_signed_t<word>;
   return cpp::bit_cast<signed_word>(array.back()) < 0;
 }
@@ -255,8 +253,8 @@ enum Direction { LEFT, RIGHT };
 // 'offset' must be less than TOTAL_BITS (i.e., sizeof(word) * CHAR_BIT * N)
 // otherwise the behavior is undefined.
 template <Direction direction, bool is_signed, typename word, size_t N>
-LIBC_INLINE LIBC_CONSTEXPR cpp::array<word, N> shift(cpp::array<word, N> array,
-                                                     size_t offset) {
+LIBC_INLINE constexpr cpp::array<word, N> shift(cpp::array<word, N> array,...
[truncated]

``````````

</details>


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


More information about the libc-commits mailing list