[libc][math] Correct expm1f16 subnormal rounding and range reporting (#236310)
Correct expm1f16 rounding for nonzero half subnormals and the negative
minimum-normal input. Select adjacent results directly, preserve signed
zero,
and use tininess after rounding for underflow/ERANGE.
Local tests on x86-64 Linux with GCC 13 and Clang 18: 5/5 focused smoke
tests
per compiler. MPFR 4.2.1 value checks cover all 63,488 finite half
encodings
in four rounding modes, with no mismatches. Reporting checks cover
nonzero
subnormals and four adjacent boundary encodings.
MPFR's own underflow flag differs at 0x03ff under upward rounding; the
PR uses
the after-rounding policy. The separate overflow fix is not included.
[2 lines not shown]
[libc][math] Report remquo domain errors and quiet signaling NaNs (#236474)
Report FE_INVALID and EDOM for remquo domain errors. Check both operands
for
signaling NaNs before quiet-NaN propagation, raising FE_INVALID and
returning
a quiet NaN. Extend the tests for operand order and NaN precedence
without
constraining the unspecified quotient on errors.
Tests: eight 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>
[Hexagon] Add HLX 64-bit scalar packet rule (#241073)
Prevent HLX instructions using 64-bit scalar operands from sharing a
packet with HLX instructions that consume scalar resources. Keep HLX
loads and stores exempt from this restriction.
Co-authored-by: Yashas Andaluri <quic_yandalur at quicinc.com>
Co-authored-by: Yashas Andaluri <quic_yandalur at quicinc.com>
[ORC] Add sps::HandlerSpec and bindCallControllerHandler (#241098)
These mirror sps::ProxySpec and recordProxy for call-controller
handlers. A HandlerSpec is built from a handler descriptor, which
supplies a default tag name and an SPS signature.
bindCallControllerHandler<Spec> binds a handler (a callable, or an
instance and method) to the spec's default tag name, or to an overriding
name.
interfaces: simplify and consolidate previous
Need to open the file as read-only. It technically belongs to
/var/lib/php/tmp but we can do that later.
We also need to run the merge much earlier and rename it since
the scope appears to be interfaces only.
While here also adjust the backend apply to do mostly the same
and reduce the indent.
One thing to keep in mind here is that the controller locks the
file, but the backend apply doesn't care but rc.newwanip(v6)
always does. Looks a bit like we should add another type of
trigger in order for the execution to do exactly the right thing.
[IR] Move getWCharSize() to Module (NFC) (#241116)
RuntimeLibcalls will need this function when adding support for wide
character functions. To avoid duplicating it there, move it to Module
alongside the other similar accessors.
AI was used to review the changes.
[InferAddressSpaces] Treat addrspacecast constant expressions from flat as roots
The pass uses the pointer operand of an `addrspacecast` instruction as a root,
but it misses the same cast folded into a constant expression unless the
constant is itself in a root position, such as a load or store pointer. So a
round trip from LDS through flat back to LDS is not folded when it is, for
example, a call operand.
This PR treats such casts in any operand as roots, including nested ones. Other
constant expressions only produce another flat pointer.
Fixes LCOMPILER-3204.
This PR was assisted by AI but I reviewed all the changes.
Hexagon: Remove dead kill flag maintenance in HexagonQFPOptimizer
The operands are virtual registers, which can no longer carry kill
flags.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
RISCV: Fix ensureDominates crashes on operands without a vreg def (#241034)
ensureDominates used an unchecked getVRegDef on every register
operand. This crashed on physical register uses or undef vregs. Also
fix dropping an incoming undef flag which would fail the verifier.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Revert "[RISCV][clang] Support XSfmm ABI attributes (#206260)" (#241096)
This reverts commit 09dcbfb936c629a1285fb04fff9974456f041804. Revert for
now and investigate why compile time increase.