[CIR] Give complex FP add/sub the fenv memory effects (#242698)
`cir.complex.fadd` and `cir.complex.fsub` were `Pure` even with a
constrained `fenv` attribute, so they could be speculated or erased like
unconstrained ops. This derives them from `CIR_FenvOp`, as the other
fenv ops are: constrained ops read and write the FP environment and are
only conditionally speculatable, while unconstrained ops stay
effect-free. A new test covers both cases.
Assisted-by: Claude Code (Opus 5.5).
[LoadStoreVectorizer] Reset endpoint after chain break (#244610)
When an overlapping load starts a new chain, reset the tracked endpoint
to that load. Otherwise a later load can be incorrectly considered
contiguous with the previous chain and form an invalid chain.
[Mips] Keep constrained FP-to-int conversions on the chain (#245915)
lowerSTRICT_FP_TO_INT replaced STRICT_FP_TO_SINT and STRICT_FP_TO_UINT
with the non-strict nodes and passed the input chain through, so a
constrained conversion could be removed when its result was unused or
moved across calls that test or change the FP environment. The
non-strict FP_TO_UINT expansion also performs both conversions
unconditionally, which raises a spurious invalid exception for inputs
that are only in range for the unsigned conversion.
Lower STRICT_FP_TO_SINT to a chained MipsISD::STRICT_TruncIntFP that
selects to the same trunc instructions, and leave STRICT_FP_TO_UINT to
the generic strict expansion, which converts once.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[llvm-ir2vec] Emit compare predicates as triplets (#245752)
Embeddings use a vector for each compare predicate, but training could
not learn them because no triplet contained a predicate
[MIR2Vec] Map classless registers to a NoRegClass entry (#245956)
Generic vregs and physregs used to get a zero embedding and the first
virtual register class ID in triplets
[CIR] Keep complex and bool casts constrained in strict FP functions
In a strictfp function ClangIR emitted plain `fpext`, `fptrunc`,
`fptosi`, `sitofp`, `uitofp` and `fcmp une` for casts between complex
types and for conversions between floating-point values and bool, where
classic codegen emits constrained intrinsics. CIRGen created the
complex casts and `float_to_bool` without the `fenv` attribute,
LoweringPrepare dropped the attribute when it expanded a complex cast,
and the LLVM lowering of `float_to_bool` and `bool_to_float` ignored
it.
`createCast` now takes an optional `fenv` attribute. CIRGen passes the
current floating-point environment for `float_to_bool` and for the
complex cast kinds that convert floating-point values. The kinds that
only select or pack a part get none. LoweringPrepare passes the
attribute of a complex cast to the scalar casts of its expansion. With
`fenv`, `float_to_bool` lowers to the quiet constrained `fcmp` and
`bool_to_float` to the constrained `uitofp`.
[5 lines not shown]
[CIR] Use the FP environment of a compound assignment for its conversions
`ScalarExprEmitter::emitCompoundAssignLValue` emitted the conversions of
a compound assignment, from the left operand to the computation type
and back, without a `CIRGenFPOptionsRAII`. Under `#pragma STDC
FENV_ACCESS ON` the arithmetic was constrained but the conversions of
`x *= 0.1` or `i += x` got the default environment, and lowered to
plain `fpext`, `fptrunc`, `sitofp` and `fptosi` where classic codegen
emits constrained intrinsics.
Install the RAII with the features of the assignment after the left
operand is loaded, as classic codegen does.
Assisted-by: Claude Code (Opus 5.5).
[SystemZ] Fix implicit defs of TRT and TRTR
TRANSLATE AND TEST and TRANSLATE AND TEST REVERSE store the function
byte in GR2 and the argument address in GR1, and never modify GR0.
Replace the incorrect R0L implicit def with R2L.
Assisted by: IBM Bob
[lldb] Compare the concrete frame index for inlining (#240963)
`StackFrameList::GetFrameWithConcreteFrameIndex` compared each frame's
index with the concrete frame index it was given. The search starts at
the frame with that index, so the first comparison always matched, and
the function returned the frame at that index instead of the first frame
with that concrete frame index. The two differ when there are inlined or
artificial frames below the frame.
The function now compares each frame's concrete frame index. It skips
the artificial frames for a tail call, which have the concrete frame
index of the next unwound frame and come before it. A scripted frame can
be artificial too, but it has a concrete frame index of its own, so it
still matches.
A concrete frame index is the unwinder's, so
`Thread::GetFrameWithConcreteFrameIndex` now searches the unwinder's
frame list. With a scripted frame provider loaded, the thread's frame
list is the provider's, and that list numbers its frames differently.
[2 lines not shown]
[X86] Silence GCC -Wfree-nonheap-object false positive in LowerShift (#245993)
GCC 13+ warns that `~APInt` calls delete[] on "an unallocated object" in
the GFNI shift lambda. `SmallVector::push_back(T&&)` passes the address
of the temporary APInt to the out-of-line grow path, so GCC can no
longer prove its BitWidth is <= 64 and considers the `delete[] U.pVal`
path with the constant still stored in the union.
The APInts are 64 bits wide, so that path is never taken. Construct them
in place with emplace_back so there is no temporary to destroy.
---------
Co-authored-by: Claude <noreply at anthropic.com>
mdio.h: Simplify "Vendor Specific"
- Rename MDIO_MMD_VNDSP[12] to MDIO_MMD_VND[12] to simplify
- Rename MDIO_VSMMD[12]* to MDIO_VND[12] for consistency