[libc] Add float type and flag for nearest_integer to enable SSE4.2.Add float type and flag for nearest integer to automatically test withand without SSE4.2 flag.Reviewed By: sivachandraDiffer
[libc] Add float type and flag for nearest_integer to enable SSE4.2.Add float type and flag for nearest integer to automatically test withand without SSE4.2 flag.Reviewed By: sivachandraDifferential Revision: https://reviews.llvm.org/D129916
show more ...
[libc] Add nearest integer instructions to fputil.Add round to nearest integer instructions to fputil. This will beused in sinf implementation https://reviews.llvm.org/D123154Reviewed By: micha
[libc] Add nearest integer instructions to fputil.Add round to nearest integer instructions to fputil. This will beused in sinf implementation https://reviews.llvm.org/D123154Reviewed By: michaelrjDifferential Revision: https://reviews.llvm.org/D129776
[libc][nfc] update get_explicit_mantissaThe get_explicit_mantissa function returns the mantissa of an FPBitsfloating point value with the implicit leading 1, if appropriate. Thisfunction existed
[libc][nfc] update get_explicit_mantissaThe get_explicit_mantissa function returns the mantissa of an FPBitsfloating point value with the implicit leading 1, if appropriate. Thisfunction existed previously, but did not handle non-normal numbersproperly.Reviewed By: lntueDifferential Revision: https://reviews.llvm.org/D129241
[libc] Add Uint128 type as a fallback when __uint128_t is not available.Also, the unused specializations of __int128_t have been removed.Differential Revision: https://reviews.llvm.org/D128304
[libc][NFC] Make explicit uint16_t casts in fenv
[libc] Fix build when __FE_DENORM is definedDifferential revision: https://reviews.llvm.org/D127222
[libc] Automatically add -mfma flag for architectures supporting FMA.Detect if the architecture supports FMA instructions and ifthe targets depend on fma.Reviewed By: gchateletDifferential Rev
[libc] Automatically add -mfma flag for architectures supporting FMA.Detect if the architecture supports FMA instructions and ifthe targets depend on fma.Reviewed By: gchateletDifferential Revision: https://reviews.llvm.org/D123615
[libc] Add support for x86-64 targets that do not have FMA instructions.Make FMA flag checks more accurate for x86-64 targets, and refactorpolyeval to use multiply and add instead when FMA instruc
[libc] Add support for x86-64 targets that do not have FMA instructions.Make FMA flag checks more accurate for x86-64 targets, and refactorpolyeval to use multiply and add instead when FMA instructions are notavailable.Reviewed By: michaelrj, sivachandraDifferential Revision: https://reviews.llvm.org/D123335
[libc][obvious] fix sqrt when long double is doublePreviously, the "fsqrt" instruction was used on all x86_64 platformsfor finding the square root of long doubles. On long double is doubleplatfor
[libc][obvious] fix sqrt when long double is doublePreviously, the "fsqrt" instruction was used on all x86_64 platformsfor finding the square root of long doubles. On long double is doubleplatforms (e.g. windows) this created errors. This patch changes squareroot function for long doubles to be the same as the one for doubles iflong doubles are doubles.Reviewed By: sivachandra, lntueDifferential Revision: https://reviews.llvm.org/D122688
[libc] Change FEnv to use MXCSR as source of truthThis patch primarily fixes the fenv implementation on Windows, sinceWindows uses the MXCSR in place of the x87 status registers for storinginform
[libc] Change FEnv to use MXCSR as source of truthThis patch primarily fixes the fenv implementation on Windows, sinceWindows uses the MXCSR in place of the x87 status registers for storinginformation about the floating point environment. This allows FEnv towork correctly on Windows, and successfully build.Reviewed By: lntueDifferential Revision: https://reviews.llvm.org/D121839
[libc] Replace type punning with bit_castAlthough type punning is defined for union in C, it is UB in C++.This patch introduces a bit_cast function to convert between types in a safe way.This is
[libc] Replace type punning with bit_castAlthough type punning is defined for union in C, it is UB in C++.This patch introduces a bit_cast function to convert between types in a safe way.This is necessary to get llvm-libc compile with GCC.This patch is extracted from D119002.Differential Revision: https://reviews.llvm.org/D119145
[libc] Refactor sqrt implementations and add tests for generic sqrt implementations.Re-apply https://reviews.llvm.org/D118173 with fix for aarch64.Reviewed By: michaelrjDifferential Revision: h
[libc] Refactor sqrt implementations and add tests for generic sqrt implementations.Re-apply https://reviews.llvm.org/D118173 with fix for aarch64.Reviewed By: michaelrjDifferential Revision: https://reviews.llvm.org/D118433
[libc] Revert "Refactor sqrt implementations and add tests for generic sqrt implementations."This reverts commit 21c4c82c2026bac1f53be54923c0663d41d0a0aa.
[libc] Refactor sqrt implementations and add tests for generic sqrt implementations.Refactor sqrt implementations:- Move architecture specific instructions from `src/math/<arch>` to `src/__support
[libc] Refactor sqrt implementations and add tests for generic sqrt implementations.Refactor sqrt implementations:- Move architecture specific instructions from `src/math/<arch>` to `src/__support/FPUtil/<arch>` folder.- Move generic implementation of `sqrt` to `src/__support/FPUtil/generic` folder and add it as a header library.- Use `src/__support/FPUtil/sqrt.h` for architecture/generic selections.- Add unit tests for generic implementation of `sqrt`.Reviewed By: sivachandraDifferential Revision: https://reviews.llvm.org/D118173
[libc][NFC] Add back NOLINT anntotations to PolyEval.They were accidentally removed in a previous change.
[libc] Add ADD_FMA_FLAG macro to add -mfma flag to functions that requires it.Add ADD_FMA_FLAG macro to add -mfma flag to functions that requires it.Reviewed By: sivachandraDifferential Revisio
[libc] Add ADD_FMA_FLAG macro to add -mfma flag to functions that requires it.Add ADD_FMA_FLAG macro to add -mfma flag to functions that requires it.Reviewed By: sivachandraDifferential Revision: https://reviews.llvm.org/D115572
[libc][NFC] Add NOLINT annotations at call sites to immintrin functions.These annotations are intended to be temporary while we understand whyclang-tidy is not able to treat them as builtin except
[libc][NFC] Add NOLINT annotations at call sites to immintrin functions.These annotations are intended to be temporary while we understand whyclang-tidy is not able to treat them as builtin exceptions.
[libc] Use intrinsics for x86-64 fma and optimize PolyEval for x86-64 with degree 3 & 5 polynomials.- Use intrinsics for x86-64 fma- Optimize PolyEval for x86-64 with degree 3 & 5 polynomials.- T
[libc] Use intrinsics for x86-64 fma and optimize PolyEval for x86-64 with degree 3 & 5 polynomials.- Use intrinsics for x86-64 fma- Optimize PolyEval for x86-64 with degree 3 & 5 polynomials.- There might be a slight loss of accuracy compared to Horner's scheme due to usages of higher powers x^2 and x^3 in the computations.Reviewed By: sivachandraDifferential Revision: https://reviews.llvm.org/D115347
[libc][Obvious] Fix variable naming in the generic sqrt implementations.
[libc] Fix two missing cases in 1c92911e9e1d503c0dfc4367da7f15d0dff50587Fix the broken build.
[libc] apply new lint rulesThis patch applies the lint rules described in the previous patch. Therewas also a significant amount of effort put into manually fixing things,since all of the templat
[libc] apply new lint rulesThis patch applies the lint rules described in the previous patch. Therewas also a significant amount of effort put into manually fixing things,since all of the templated functions, or structs defined in /spec, werenot updated and had to be handled manually.Reviewed By: sivachandra, lntueDifferential Revision: https://reviews.llvm.org/D114302
[libc] Fix invalid include for SqrtLongDouble.h
[libc] Select FPUtils implementations via code instead of buildWe want to simplify the build system and rely on code to do the implementation selection.This is in preparation of adding a Bazel con
[libc] Select FPUtils implementations via code instead of buildWe want to simplify the build system and rely on code to do the implementation selection.This is in preparation of adding a Bazel configuration (D114712).Differential Revision: https://reviews.llvm.org/D115034
[libc][NFC] Move utils/CPP to src/__support/CPP.The idea is to move all pieces related to the actual libc sources to the"src" directory. This allows downstream users to ship and build just the"sr
[libc][NFC] Move utils/CPP to src/__support/CPP.The idea is to move all pieces related to the actual libc sources to the"src" directory. This allows downstream users to ship and build just the"src" directory.Reviewed By: michaelrjDifferential Revision: https://reviews.llvm.org/D112653
[libc] Add FE_DFL_ENV and handle it in fesetenv.Reviewed By: michaelrjDifferential Revision: https://reviews.llvm.org/D110611
12