[libc] Add missing shared_math docs in `add_math_function.md` (#188026)
This PR intends to add/update the following things:
- Add missing doc for CMake for shared_math
- Add missing testing command for shared_math_test
- Nits (e.g., grammar, spaces, missing colons, etc.)
[SLP]Fix codegen of compares with consts, being trunced
If the const values have more active bits, than requested by the another
operand of the compare, such constants should not be trunced to avoid
miscompilation
AMDGPU: Codegen for v_dual_dot2acc_f32_f16/bf16 from VOP3
Codegen for v_dual_dot2acc_f32_f16/bf16 for targets that only have VOP3
version of the instruction.
Since there is no VOP2 version, instroduce temporary mir DOT2ACC pseudo
that is selected when there are no src_modifiers. This DOT2ACC pseudo
has src2 tied to dst (like the VOP2 version), PostRA pseudo expansion will
restore pseudo to VOP3 version of the instruction.
CreateVOPD will recoginize such VOP3 pseudo and generate v_dual_dot2acc.
[MLIR] Fix crash when parsing typed attribute via parseOptionalAttribute (#186192)
When calling `parseOptionalAttribute(result, type)` with a typed result
(e.g. `FloatAttr`), the call resolved to the generic
`parseOptionalAttribute(Attribute&, Type)` overload via implicit
conversion. This overload accepted any attribute, including ones that
don't match the expected concrete type. The caller would then invoke
type-specific methods (e.g. `FloatAttr::getValue()`) on storage that
belongs to a different attribute kind (e.g. `IntegerAttr`), causing a
type-confusion crash.
The fix adds a non-virtual template overload of `parseOptionalAttribute`
in `AsmParser` that intercepts calls for concrete attribute types not
covered by the dedicated virtual overloads (`Attribute`, `ArrayAttr`,
`StringAttr`, `SymbolRefAttr`). It parses the attribute generically and
then validates the result type via `dyn_cast`, emitting an error if the
parsed attribute is of the wrong kind.
Fixes #108135
Assisted-by: Claude Code
AMDGPU: Codegen for v_dual_dot2acc_f32_f16/bf16 from VOP3
Codegen for v_dual_dot2acc_f32_f16/bf16 for targets that only have VOP3
version of the instruction.
Since there is no VOP2 version, instroduce temporary mir DOT2ACC pseudo
that is selected when there are no src_modifiers. This DOT2ACC pseudo
has src2 tied to dst (like the VOP2 version), PostRA pseudo expansion will
restore pseudo to VOP3 version of the instruction.
CreateVOPD will recoginize such VOP3 pseudo and generate v_dual_dot2acc.
[mlir][tblgen] Emit diagnostic instead of crashing for invalid interface method arg type (#186430)
When an interface method argument uses a non-string type (e.g., a
TableGen class reference like `Foo` instead of a string literal
`"Foo"`), the code in `InterfaceMethod::InterfaceMethod` would crash
with an assertion failure in `cast<StringInit>`. Replace the unchecked
cast with a `dyn_cast` and emit a `PrintFatalError` with a descriptive
error message pointing to the source location and identifying which
argument has the wrong type.
Before this fix:
mlir-tblgen: Assertion `isa<To>(Val) && "cast<Ty>() argument of
incompatible type\!"' failed.
After this fix:
error: expected string type for interface method argument #0 ('arg') ...
Fixes #61869
Assisted-by: Claude Code
IntegerAttr accessor changed to returning APInt by reference. (#187351)
IntegerAttr accessor getValue() returned an APInt by value. This works
well for the case where APInt is small, but leads to unnecessary copies
for larger bitwidths. This change switches this to returnsa const APInt&
instead.
[clang][bytecode] Use tailcalls via `[[clang::musttail]]` (#173756)
This PR attempts to use a tailcall design for the bytecode interpreter
instead of the giant-switch design, similar to [what Python has been
doing](https://blog.reverberate.org/2025/02/10/tail-call-updates.html).
Using the two benchmarks from
https://developers.redhat.com/articles/2025/10/15/clang-bytecode-interpreter-update,
I get these numbers:
```
-- Sqlite
BASELINE:
Benchmark 1: bin/clang++ -c -std=c++26 sqlite.cpp -fconstexpr-steps=1000000000
Time (mean ± σ): 18.197 s ± 0.370 s [User: 17.926 s, System: 0.269 s]
Range (min … max): 17.657 s … 19.215 s 30 runs
BEFORE:
Benchmark 1: bin/clang++ -c -std=c++26 sqlite.cpp -fconstexpr-steps=1000000000 -fexperimental-new-constant-interpreter
Time (mean ± σ): 8.156 s ± 0.148 s [User: 7.881 s, System: 0.273 s]
[26 lines not shown]
uvmpd_scan_queue: remove ENABLE_UNRELIABLE_CHECK_PR_56764 block
while this condition is true in most of times, we can't
assert it here because these counters are not always
updated in-sync.
for example, consider a removal of a large tmpfs file which is
mostly swapped out. because uao_dropswap_range() batches swpgonly
updates, swpgonly can be temporarily larger than swpginuse.
the original symptom reported in PR/56764 ("uvmexp.swpgonly > 0")
looks like a different issue though.
https://gnats.netbsd.org/56764
Query kea-ctrl-socket for existing leases since the in-memory database is mutated when using lease-del, the csv files still show leases for a while that do not exist in memory anymore until a cleanup happens periodically.
mvc: Shell: rewrite exec_safe() to avoid vsprintf() complications; closes #9703
Only support %s and %% using preg_replace_callback() and throw
3 distinct TypeError cases making sure the resulting command is
the dummy command then.
We're not overly interested in how well escapeshellarg() works,
but we ensure it's being called always.
(cherry picked from commit b25bdee3b4d76b4e722d30fadd3591d90e30b50c)
(cherry picked from commit aef0172f5596683f4dba6a805f80b85116653dff)