[libc][math] Return success when canonicalize quiets a signaling NaN (#236476)
Return zero when canonicalize successfully stores a quiet NaN for a
signaling
input, while retaining FE_INVALID. Update canonicalize and dependent
iscanonical tests: signaling NaNs have canonical encodings. Unsupported
binary80 representation handling is unchanged.
Tests: 21 canonicalize/iscanonical smoke configurations per compiler
with
GCC 13 and Clang 18 on x86-64 Linux.
Assisted-by: GitHub Copilot
---------
Signed-off-by: sriramshastry <sriramshastry at gmail.com>
[llvm-cas] Use subcommands for llvm-cas actions (#233966)
Turn the llvm-cas actions, e.g. `--make-blob`, into subcommands, e.g.
`make-blob`, and register each option with the subcommands that use it
so that `llvm-cas <subcommand> --help` only shows the relevant options.
The first positional argument that is a subcommand name is the
subcommand, and later ones are inputs. For backwards compatibility, the
legacy `--<subcommand>` and `-<subcommand>` spellings are rewritten into
the subcommand before parsing.
Update the existing tests to use the new syntax. The legacy spellings
are still tested in subcommand.test.
[libc] Treat -1 from fopencookie callbacks as an error (#236970)
A read or write callback returning -1 was cast to size_t and taken as a
count. A read then set the buffer's limit to SIZE_MAX and the next read
copied from far past the buffer, which crashed procps' sysctl at the end
of every file. A failing seek returned -1 as the new offset. Now a
negative result is an error and the call fails with EIO
AI disclosure: this patch was written with Claude Code. I reviewed the
change and ran the fopencookie unit test in a full build; the new test
fails without the fix and passes with it
Assisted-by: Claude
[OpenMP] Add interface for flushing with memory order and scope (#133325)
Current specification allows user input to the flush construct via
clauses for memory order and scope.
[lldb] Disable failing/flaky tests on Windows (#239328)
After #227355
- TestWatchLocationWithWatchSet.py and TestWatchpointMultipleThreads.py
are flaky on the x86 buildbot (#239322)
- TestLongjmp.py fails on the Windows on ARM buildbot (#239325)
This disables the tests.
RuntimeLibcalls: Add signatures for size returning new and GPU profiling
__size_returning_new and its variants return __sized_ptr_t, a pointer
and size pair. The GPU profiling functions use the compiler-rt
prototypes.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
TableGen: Only build the register bank in CallingConvEmitter when needed (#239306)
CallingConvEmitter built the register bank to find registers named by
strings, which only CCAssignToRegTuple uses. No target does, but
building the register bank is most of the work for targets with many
registers. Build it when the first register name is looked up instead.
All 16 CallingConv tablegen runs in an LLVM build with all targets:
Gigainstructions Gigacycles CPU seconds
Before 73.5 43.4 15.1
After 47.1 (-35.9%) 27.7 (-36.2%) 10.2 (-32.2%)
For AMDGPU alone, the run executes 63% fewer cycles.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
RuntimeLibcalls: Mark vector libcall out pointers dereferenceable (#238228)
The whole vector width will be written, so mark the vector width. To
maintain the element width alignment for some functions, we need to
start explicitly tracking if the element alignment is used or not.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[IPO] Declare more command line options in TableGen (#239305)
Port the options of FunctionAttrs, FunctionImport, LowerTypeTests and
WholeProgramDevirt.
Rename -disable-nounwind-inference and -disable-nofree-inference to
-nounwind-inference and -nofree-inference, and add temporary aliases for
old spellings.
LLM-aided
ARM: Remove dead kill flag maintenance in MVETPAndVPTOptimisations
This pass runs before register allocation, and the verifier now
rejects kill flags on virtual registers.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
EarlyIfConversion: Remove dead kill flag maintenance
The verifier now rejects kill flags on virtual registers, so there are
never repeated kills of a virtual register in the two sides of a
diamond to clear.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
AArch64: Remove dead kill flag maintenance in AArch64PostCoalescer
The sources of the transposed tuple pseudos are virtual registers,
which can no longer carry kill flags.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Remove kill flags on virtual registers from more tests
The two-address test relied on the kill flag to see that the second
source is killed, so compute live intervals first instead.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply at anthropic.com>
MachineVerifier: Disallow kill flags on virtual registers
Kill flags are deprecated, and nothing introduces them on virtual
registers anymore. Reject them in the verifier to prevent new uses
from creeping back in. Kill flags on physical registers are still
permitted. There are still some lingering post-RA kill flag reliance.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[MIR] Reject out-of-range CFI address space (#233410)
By forwarding to `parseCFIUnsigned` in `parseCFIAddressSpace`, we avoid a
silent truncation to 32 bit and instead reject this case with an error message.
[MIR][MC] Use int64_t for CFI offset (#233437)
`int64_t` is consistently used by the MCCFIInstruction for the `Offset` fields.
This change set makes the MIR parser and the
`FrameEmitterImpl::emitCFIInstruction` function match.
net/rustdesk-server: Add missing dependency zstd
Add the missing libzstd to LIB_DEPENDS: upstream requires zstd,
which was only pulled in indirectly through lang/rust.
PR: 300523
Approved by: no maintainer
Approved by: osa, vvd (mentors, implicit)
MFH: 2026Q4
(cherry picked from commit 58051848f8480ce49cdf0899e81e41137642b731)
net/rustdesk-server: Add missing dependency zstd
Add the missing libzstd to LIB_DEPENDS: upstream requires zstd,
which was only pulled in indirectly through lang/rust.
PR: 300523
Approved by: no maintainer
Approved by: osa, vvd (mentors, implicit)
MFH: 2026Q4
[mlir][math] Fix the sign of zero-base results in the fpowi expansion (#237452)
For a constant negative exponent, `--math-expand-ops` expands
`math.fpowi` as `1 / x^|n|`. However, it gives a wrong result for
`(+0.0)^-1`, `(+0.0)^-2` and `(-0.0)^-2`, which become -inf, but should
be +inf.
To avoid dividing by zero, the pass selects +inf if `x^|n|` compares
`oeq` to +0.0 and -inf if it compares `oeq` to -0.0 (added in #87081).
However, because `oeq` treats +0.0 and -0.0 as equal, both comparisons
hold for either zero and -inf is always selected.
This patch removes the comparisons and selects and keeps only 1 / x^|n|.
Division by a signed zero gives the correctly signed infinity, and since
x^|n| is computed by repeated multiplication, a zero result has the
correct sign, e.g. (-0.0) * (-0.0) = +0.0.
It also updates the two `fpowi` CHECK sequences in `expand-math.mlir`
and adds runtime cases to `test-expand-math-approx.mlir` for +0.0, -0.0
[3 lines not shown]
[scudo] Add comments to getHeaderTaggedPointer
getHeaderTaggedPointer needed some clarification about why it picks
certain tags for different allocations.
[SafeStack] Stop emitting an invalid function annotation for the unsafe stack size (#229440)
The verifier requires that annotation "operands must be a string or a
tuple of strings", and code that reads annotations relies on this
contract. But SafeStack stored the unsafe stack size as an integer in
the function annotation `!{!"unsafe-stack-size", i32 N}`. The verifier
only checked annotations on instructions, so this went unnoticed.
`MachineFunction` read the value back with
`mdconst::extract<ConstantInt>`, which asserts on any other operand, so
a valid annotation of the same name with a string value asserted in
codegen.
Record the size in the `"unsafe-stack-size"` string function attribute
instead, as is done for `"warn-stack-size"`, and check its value in the
verifier. Also verify function annotations with
`visitAnnotationMetadata`.
Fixes #229406
Assisted-by: Claude Opus 5.5