[AMDGPU] Support 'lds' as a normal named-bit modifier (#248393)
b49855fc5684 made lds be parsed as a named bit, but in the asm strings
it remained a token, with parseCustomOperand() parsing it with
parseNamedBit() and validateTargetOperandClass() accepting the resulting
operand for the token. nolds was parsed and then dropped without adding
an operand.
This work-around is not needed. The modifier can be a normal named-bit
operand of the real instructions. The LDS DMA instructions require it to
be set and the buffer, global and scratch loads that have LDS DMA
variants accept nolds.
Side effects:
- nolds is now accepted on targets where the LDS DMA variants of the
loads are not available, e.g., buffer_load_dwordx4 before gfx950 and
global and scratch loads on gfx940+. lds is still rejected there. This
is consistent with nogds, which is accepted on targets without GDS.
[16 lines not shown]
[VectorCombine] Fix invalid bitcast after peeking through bitcasts
foldBitcastShuffle looks through the bitcasts of the shuffle operands
and bitcasts their sources to the new shuffle type. Some sources can't
be bitcast to it, e.g. an integer vector to a pointer vector, which
fails with "Invalid cast!". For such a source, bitcast the operand
itself. Don't fold if that leaves no operand looked through, which is
always the case for a unary shuffle: the new bitcast of a bitcast can
be turned back into the original form by foldShuffleToIdentity, which
loops for repeat and extract masks.
Assisted-by: Claude Code (Claude Opus 5.5)
[VectorCombine] Fix crash on bitcasts of pointer vectors
foldBitcastShuffle divides by the scalar sizes of the source and
destination element types, which are zero for pointers. A bitcast of a
shuffled pointer vector, or one between a byte vector and a pointer
vector, then crashes with a division by zero. Take the sizes from the
DataLayout, so these bitcasts are folded too.
Fixes #246659
Assisted-by: Claude Code (Claude Opus 5.5)
[LoongArch] Assert BSTRPICK bounds and shorten a comment
The BSTRPICK producers guarantee lsb <= msb < GRLen, so the msb check
in unfoldBSTRPICK can't fail. Assert the bounds. Also shorten the
comment in performORCombine.
Assisted-by: Claude Code (Claude Opus 5.5)
[LoongArch] Match BSTRINS when an OR operand is already a BSTRPICK
performANDCombine rewrites (and X, mask) into BSTRPICK, or into
(shl (BSTRPICK X, msb, lsb), lsb) for a shifted mask. The BSTRINS
patterns in performORCombine only match ISD::AND, so they miss an OR
whose AND operand was rewritten before the OR was combined. In the
default order this happens when the operand only becomes an AND after
the OR was combined, e.g. in an expanded funnel shift. With
-combiner-topological-sorting (#83422), which visits operands before
their users, it happens for any OR. The OR is then selected as separate
bstrpick, shift and or instructions.
Before matching, turn such operands back into the AND they came from,
and build the result from the original operands. The pattern conditions
are unchanged.
In the default order this shortens the funnel shift tests. In a sample
of real-world bitcode compiled for loongarch64, 7 functions get shorter
and none longer, e.g. a byte inserted into the top of an i64 and vXi1
[3 lines not shown]
[LoongArch] Add BSTRINS tests with an OR built from a funnel shift (NFC)
These ORs should give BSTRINS. The expansion of the funnel shift
creates an OR of two shifts. One shift folds into an AND, which
performANDCombine turns into BSTRPICK before the OR is combined
again, so the OR is selected as separate bstrpick, shift and or
instructions.
Assisted-by: Claude Code (Claude Opus 5.5)
[MIR2Vec] Embed instructions inside bundles instead of the BUNDLE header (#248629)
BUNDLE header emits no code
Real instructions sit inside it, so post-RA embeddings and triplets were
missing them
imxclock: Fix timekeeping errors.
The following two warnings appeared in dmesg on every NetWalker boot.
Before this change, they appeared every time about 21 seconds after
boot:
WARNING: lwp 29 (system sdmmc0) ...: timecounter went backwards
... in netbsd:mi_switch+0xf0
WARNING: pid ... (devpubd): negative runtime; monotonic clock has
gone backwards
The time difference in the warnings was about 0.576 s, which matches
the value computed in cause 1 below.
Cause 1: the value goes back right after a reload (a 0.576 s step).
imx_epit_get_timecount() returned base - CNT. When the value goes
back, the difference in kern_tc.c (tc_delta) wraps to nearly 2^32, the
multiplication overflows, and the time jumps forward by
frac((2^32 - LR) / f). On a NetWalker (66.5 MHz, LR = 664999), this
[17 lines not shown]
py-brotli: link against archivers/brotli
Set USE_SYSTEM_BROTLI so that only the Python binding is built and
linked against the shared libraries from archivers/brotli, instead
of compiling the copy of the library bundled in the distfile.
Drop c++ from USE_LANGUAGES; the binding is plain C.
Bump PKGREVISION.
[MLIR][CMake] Stop depending on mlir-generic-headers by default
Remove the default mlir-generic-headers dependency from ordinary and
example libraries, and migrate their generated-interface requirements to
library owners. Keep the compatibility aggregate and registrations.
MLIRIR now owns MLIRInferIntRangeInterfaceIncGen, which Matchers.h
includes. Add the Transform/Interfaces generator-to-generator
dependency. MLIRDialectUtils switches from MLIRArithOpsIncGen to
COMPILE_ONLY:MLIRArithDialect because ReshapeOpsUtils.h includes
Arith.h.
Extend the release note and aggregate regression test.
Assisted-by: Codex