[flang][NFC] Correct a stale comment on loop reclassification
Two places weaken the classification now, so calling this one "the one
place" is out of date.
[flang] Let a directive keep the loop it owns when its body branches
A loop whose branching is confined to its body keeps its structured
form, but the construct holding it stayed Unstructured. A directive does
not merely contain such a loop, it owns it, and its lowering reads the
construct's own classification to decide whether the loop op carries its
bounds. The directive was left with a bounds-free loop that nothing
could partition, and the loop it owns became a second one nested inside.
Reclassify a directive construct once the loops it holds no longer need
it to stay Unstructured. Children are visited first, so those loops have
already been reclassified by the time the construct is reached. A
construct whose branching leaves it is untouched, as is one holding a
branch of its own.
Taking a loop over also means genFIR(DoConstruct) -- where a plain loop
folds a body whose branching stays inside it into a region -- never runs
for that loop, so fold its body through the same helper. A construct
that takes over no loop, acc data or acc parallel without a loop
[5 lines not shown]
[flang][NFC] Split the OpenACC construct lowering into two lanes
genFIR(OpenACCConstruct) decided twice, in three places, whether the
construct it lowers is structured, and reassigned the evaluation it works
from halfway through: before the descent that evaluation is the construct,
after it the loop the directive absorbs. Everything downstream had to know
which one it was holding.
Give each form its own function and leave genFIR to choose between them.
One lane allocates the exit selector, lowers the evaluations the construct
holds, and emits the jump table; the other reads the collapse clauses,
descends to the absorbed depth, and lowers what is inside it. The prologue
and epilogue are short enough to state in both rather than share.
[AMDGPU][GlobalISel] Fold neg/abs modifiers when mad-mix selects the low half
selectVOP3PMadMixModsImpl re-runs the fneg/fabs match after rewriting Src
to the 32-bit register the 16-bit value is a half of, but only did so on
the isExtractHiElt path, not for isExtractLoElt.
The two halves are not symmetric. An fneg/fabs of a 32-bit float only
touches bit 31, which is the sign bit of the high half, so folding it
into a modifier on the selected high half is correct. The low half's sign
bit is bit 15, which such an fneg/fabs leaves alone, so only a modifier
that acts on each 16-bit element can be folded there. So the source must be
a 2 x 16-bit vector to fold it.
[mlir][vector] Fix VectorToSCF in-bounds check for negative indices (#224843)
generateInBoundsCheck used a signed comparison (sgt) to guard the
runtime in-bounds branch. A negative dynamic index satisfies the signed
comparison against the upper bound and is incorrectly treated as
in-bounds, permitting an out-of-bounds access.
Switch to an unsigned comparison (ugt): a negative value reinterpreted
as unsigned becomes larger than any valid bound, so the existing
upper-bound check alone now also correctly rejects negative indices.
Fixes #223258
[msan][test] Add tests for Arm NEON fp8 fdot (#225230)
Forked from llvm/test/CodeGen/AArch64/fp8-neon-fdot.ll
These intrinsics are currently handled strictly. Future work should
propagate the shadows.
[CIR] Coerce record returns from memory like CreateCoercedLoad (#227482)
Read a coerced record return straight from the alloca it was loaded
from. If that isn't possible, copy the record's bytes into a coercion
slot and read from there. Neither path stores the record as a value. A
union stored as a value keeps only its storage member and loses the
bytes that are padding in that member.
Assisted-by: Claude Code / Claude Opus 5.5
[CodeGen][WebAssembly] Reserve a personality for the D language (#224883)
Now that #209282 is merged, languages/code may choose to create and use
personality functions other than `__gxx_wasm_personality_v0` on
WebAssembly. However said personality must still be
`isScopedEHPersonality` and recognized as a Wasm personality for
everything to function correctly.
This reserves a `EHPersonality::Wasm_D` (symbol
`_d_eh_personality_wasm`) for future use by the D programming language.
[flang] Fix continued literals incorrect padding with -ffixed-line-length=none (#225051)
`-ffixed-line-length=none` and `=0` were implemented as a column limit
of 1000000. This led to `PadOutCharacterLiteral` inserting a million
blank characters when the flag was used. This PR fixes this by making
the `fixedFormColumns` param an optional type. No padding being inserted
is coherent with `gfortran`'s behavior when the equivalent flag is
passed.
Examples of Fujitsu test suite tests that trigger this behavior:
`0001_0073`, `0131_0048`, `0131_0052`, `0161_0003`.
NOTE: This also makes it so lines over one million characters don't get
silently truncated.