math/faiss: fix build for CPUTYPE=znver4
... by backporting the GitHub pull request that I've created.
PR: 298198
Reported by: Daniel Engberg <diizzy at FreeBSD.org>
math/faiss: fix build for CPUTYPE=znver4
... by backporting the GitHub pull request that I've created.
PR: 298198
Reported by: Daniel Engberg <diizzy at FreeBSD.org>
[libc][math] Optimize exp and share double-precision evaluation with exp2.
Refactor double-precision exp to share most of the computations with exp2,
and adding support for `LIBC_MATH_HAS_SMALL_TABLES` and
`LIBC_MATH_HAS_SKIP_ACCURATE_PATH.
Assisted by: Gemini is used for performance and code size analysis and refactoring.
cc1as: Parse library options into a context. NFC (#233017)
Follow-up to #231407: move tools off cl::ParseCommandLineOptions, which
sets the libraries' `XXXOptions::Global`, to
`cl::parseCommandLineOptions(LibraryOptionsContext &, ...)`.
This prepares for removing the T::Global fallback in
`LibraryOptionsContext::get<T>()`.
Parse library options into a context. NFC (#233013)
Follow-up to #231407: move tools off cl::ParseCommandLineOptions, which
sets the libraries' `XXXOptions::Global`, to
`cl::parseCommandLineOptions(LibraryOptionsContext &, ...)`.
This prepares for removing the T::Global fallback in
`LibraryOptionsContext::get<T>()`.
Parse library options into a context in more tools. NFC
Follow-up to #231407: move tools off cl::ParseCommandLineOptions, which
sets the libraries' `XXXOptions::Global`, to
`cl::parseCommandLineOptions(LibraryOptionsContext &, ...)`.
This prepares for removing the T::Global fallback in
`LibraryOptionsContext::get<T>()`.
Parse library options into a context in more tools. NFC (#233016)
Follow-up to #231407: move tools off cl::ParseCommandLineOptions, which
sets the libraries' `XXXOptions::Global`, to
`cl::parseCommandLineOptions(LibraryOptionsContext &, ...)`.
This prepares for removing the T::Global fallback in
`LibraryOptionsContext::get<T>()`.
[libc++] Properly pass the LNT submission token to the submit workflow (#233010)
Reusable worklows don't automatically get their environment secrets
passed, they need to declare them and their callers to pass them
explicitly.
[SLP] Handle REVEC when costing expanded compress mask
With REVEC the scalars are vectors. The masked-load-compress shuffle that is
emitted uses the compress mask expanded to the elements of those vectors
(transformScalarShuffleIndiciesToVector), but the cost was computed with the
unexpanded per-vector mask, so a shuffle such as <24 x i8> -> <16 x i8> was
costed as a <2 x i8> shuffle. This made the compress sequence looked cheaper
than it is.
Assisted-By: Claude Sonnet 5.5
[mlir] Check greedy rewrite fingerprints and changed flag (#232576)
Under EXPENSIVE_CHECKS, compare operation fingerprints before and after
greedy rewriting. If the IR changes but the driver reports no change,
emit a fatal error.
Assisted-by: gpt 6.1 sol
[InstCombine] Canonicalize atomicrmw sub of a constant to add
Rewrite `atomicrmw sub ptr, C` as `atomicrmw add ptr, -C`. This
matches the canonical form InstCombine already uses for plain `sub`.
In wrapping arithmetic $old - C = old + (-C)$, so both the stored
value and the returned old value stay the same, including when C is
`INT_MIN`. Ordering, syncscope and metadata are kept.
```llvm
; before
%old = atomicrmw sub ptr %p, i32 1 syncscope("agent") monotonic
; after
%old = atomicrmw add ptr %p, i32 -1 syncscope("agent") monotonic
```
This benefits AMDGPU, for example: https://godbolt.org/z/39xsYro3o