[Mips][GlobalISel] Fix Big Endian lowering (#225972)
Flip on the big-endian switch in Mips call lowering. Fix split memory
piece placement, short-load bit extraction, and unaligned left/right
instruction offsets for big-endian targets.
Add BE/LE test coverage.
[AMDGPU] Simplify true16 SGPR folding (#226082)
Rewrite part of the SGPR folding "hack" from #128929 using
getChannelFromSubReg to avoid relying on the exact numbering of subreg
indices.
This also fixes a potential bug when folding a copy with no subreg on
the source operand like `%1:sgpr_lo16 = COPY %0:sgpr_lo16`. The old
implementation would have generated `%0.sub0:sgpr_lo16` which fails
machine verification.
Co-authored-by: Claude Opus 5 (1M context) <noreply at anthropic.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply at anthropic.com>
[flang] Lower loops whose branching is confined to their body structurally
Such a loop was classified separately by a previous change but still
lowered as a raw CFG, so its structured form was lost.
Lower it structurally instead, with its body folded into a region that can
hold the branching. The loop keeps its bounds on the op, so it remains
available to whatever transforms or parallelizes it. Only the body is
folded: the loop control statements are emitted as they are for any
structured loop, since a branch from outside may target either of them.
Loops an OpenACC or OpenMP directive owns are lowered the same way, so
they keep their form too.
[GlobalISel] Only narrow IEEE half in narrowScalarFPTOI (#223615)
narrowScalarFPTOI swaps a conversion for a narrower one plus an
extension, which is only valid if every finite value of the source fits
in the narrow type. The guard tests the width, so it also accepts
bfloat, which has float's exponent range.
Match LLT::float16() instead of LLT::scalar(16). Register types come
from LLT::floatingPoint(), which degrades to ANY_SCALAR without extended
LLTs, and an ANY_SCALAR LLT matches any scalar of the same size, so this
is unchanged on such targets. AArch64 and AMDGPU only narrow
LLT::float16() sources and WebAssembly does not narrow these at all, so
they are unaffected too.
[flang] Detect loops whose branching is confined to their body
A DO loop is classified as either structured or unstructured, and a single
raw branch anywhere in its body forces the loop -- and every construct
enclosing it -- onto the unstructured path.
That is stronger than necessary. A loop keeps its structured control flow
as long as its branching neither leaves its body nor enters it from
outside. Classify such a loop separately from a fully unstructured one.
This only classifies: lowering is unchanged. PFT dumps mark the new
classification with '~', which is what the tests key on.
[flang] Resolve an assigned GO TO's targets from the completed assign map
An assigned GO TO reaches any label ASSIGNed to its variable, and a label
list does not bound that: lowering allows a branch to any ASSIGNed label
whether or not the list names it. Branch analysis only sees the ASSIGNs
preceding the GO TO in program order, so the successors it records, and the
incoming branches derived from them, can be incomplete.
The symbol-to-labels map is complete once branch analysis has finished,
which is when the classification runs. Ask it for the full target set
instead of trusting the recorded successors, so a loop whose assigned GO TO
stays within its body is still recognised.
[flang] Record the evaluations that branch to each evaluation
The PFT records where each branch goes, but not where it comes from, so
asking whether anything branches into a construct means walking the whole
procedure.
Record the reverse edges beside the forward ones, and print them in PFT
dumps so both directions of the branch graph are visible.
[flang][NFC] Say which control successors are not incoming branches
The map records branches, not every control successor: a construct
transferring control between its own statements is not a branch
(F2023 11.2.1 p1), so the successors analyzeBranches sets directly are
absent from it. Say so, rather than calling the map a plain inverse.
[MC] Prevent multiplication overflow when calling `encodeULEB128` (#224647)
`encodeULEB128` takes its `Value` as a 64-bit integer but the
multiplication is done using 32 bits. This fixes two issues reported by
a CodeQL scan however it's unclear how realistic an overflow is in this
case.
[mlir] Fold interface-map trait packs without recursive templates (NFC) (#226084)
Count interface traits and insert their models with fold expressions.
This keeps insertion order and avoids two recursive template chains for
every registered operation.
Assisted-by: Codex
py-stone: updated to 3.5.5
3.5.5
Migrate PyPI publishing to Trusted Publishing
Update packaging requirement from >=26.2 to >=26.3
Update coverage requirement from >=7.15.2 to >=7.16.0
Update setuptools requirement from >=83.0.0 to >=84.0.0
Update pytest requirement from >=7.0.0 to >=9.1.1