[LoongArch][NFC] Pre-commit tests for sign-extended vector element extraction (#241718)
Add tests where a constant-index i8/i16 vector element extraction is
followed by a sign extension.
Assisted-By: LLM
[LoongArch] Use signed vector extract for sign extension (#241719)
`[x]vpickve2gr.{b/h}` already sign-extends the extracted element to
GRLen, so a following `ext.w.{b/h}` is redundant:
```llvm
%e = extractelement <16 x i8> %v, i64 7
%r = sext i8 %e to i32
```
```asm
vpickve2gr.b $a0, $vr0, 7
ext.w.b $a0, $a0
```
Add patterns that fold sext_inreg of a constant-index i8/i16 vector
extraction into VPICKVE2GR_B/H, mirroring the existing zero-extension
patterns for VPICKVE2GR_BU/HU. The i32 case already needs no extra
instruction.
Assisted-By: LLM
configd/templates - repair unittests by adding an optional test template directory in the Template() constructor, reintroducing OPNsense/Sample in that scope
[mlir][SPIR-V] Pack only CPacked structs in SPIRVToLLVM (#245771)
Other structs without Offset have natural alignment, so packing them
misplaced members
[mlir][SPIR-V] Order -0.0 before +0.0 in arith.maximumf/minimumf (#245530)
FMax and FMin return the first operand on ties, so max(-0.0, +0.0) gave
-0.0
In #225667 the same bug was fixed for llvm.maximum/minimum in the SPIR-V
backend
[AMDGPU] Remove R600 usage from llvm tests. NFC
Second step of removing the R600 (TeraScale) tests:
* [x] clang, flang, lld tests (#245524)
* [x] llvm tests (this patch)
Tests that only cover R600 are deleted, including the tests of the
`llvm.r600.*` intrinsics. In tests shared with GCN, the r600 RUN lines
and their now unused EG, CM and R600 checks and comments are removed,
and autogenerated checks are regenerated. The R600 cases in the yaml,
TableGen, TargetParser, Triple and DataLayout upgrade tests are removed
too:
```
; RUN: llc -mtriple=amdgcn -mcpu=tahiti < %s | FileCheck -check-prefixes=SI,FUNC %s
; RUN: llc -mtriple=r600 -mcpu=redwood < %s | FileCheck -check-prefixes=EG,FUNC %s
; EG: LDS_READ_RET
-->
[8 lines not shown]
[SLP][AArch64] Don't count splats folded into indexed FMLA in inst count (#230105)
The VF=2 instruction-count check (#190414) counts each splat gather as
one instruction per lane, including repeated gathers of the same splat.
In two Horner chains in x^2, the splat of x^2 feeds each level's fused
fmul/fadd pair, so the check sees 15 vector instructions against 8
scalar fmas and rejects a tree the cost model finds profitable. AArch64
emits no splat here: each pair becomes an indexed `fmla.2d` that reads
lane 0.
This uses the build-vector context hint (#224766). AArch64 reports
`SplatOpFolded` for an FP splat whose fmul users each fuse with a
contractable fadd or fsub of the same opcode in their block, decided
from the IR, and costs its broadcast as free. The count skips a splat
gather when the new `TTI::isSplatFolded()` says so: it checks for a
splat of a non-constant value and queries the hint, with SLP only
supplying the users. Unfused fmuls are not reported, since the scalar
count only credits fused pairs as fmas. Splats with undef lanes may need
a freeze and are never treated as folded.
[29 lines not shown]
don't run ~/.ssh/rc and co for forced command and internal-sftp,
even if PermitUserRC is enabled, avoiding /proc based attacks on
some systems
Anthropic ANT-2026-IG416NNU
[mlir][ComplexToStandard] Fix fmf handling in tan/tanh lowering (#243398)
When computing `complex.tan[h](x + iy)`, intermediate results like `2x`,
`expm1(2x)` or `expm1(-2x)` may overflow even though the final result
doesn't. Passing the `ninf` flag to them (and to the ops that use them,
up until the inf comparison) is thus incorrect, and leads to the branch
that handles the overflow case being optimized out.
Based on which flags are present, special value handling can also be
simplified by e.g. not checking if `x` is inf if ninf is present.
[mlir][SPIR-V] Lower Pure and Const function control to memory effects (#245757)
LLVM accepts readonly and readnone only on parameters, so the
passthrough form failed translation
Make the default op registration opt-in and undo most of the dialect migration
`useDefaultOperationRegistration` now defaults to 0 so that downstream dialects
registering their operations with `addOperations` keep working unchanged.
Only the dialects that already registered their ops with the generated hooks
(CIR, LLVM, NVVM, ROCDL, SPIRV and Test) as well as python_test opt in.
The migration of the other upstream dialects moves to a follow-up PR.
Co-authored-by: Claude <noreply at anthropic.com>
[mlir][ODS] Register the operations of a dialect by default
Dialects registered their ODS operations by expanding `GET_OP_LIST` into
`addOperations` in `initialize`, while sharded and partitioned dialects
had to call the generated `register<Dialect>Operations` themselves.
This was not only an inconsistent interface but also boilerplate for every dialect definition.
Like attributes and types do since https://github.com/llvm/llvm-project/pull/243481, operations are now only registered by a generated
`register<Dialect>Operations` hook that the generated dialect
constructor calls, for all generated files whether sharded, partitioned
or neither (i.e., we are consistent again!).
Contrary to attributes and types, this is the default, as
almost every dialect defines operations in ODS. Dialects without
operations, or that register them manually, set
`useDefaultOperationRegistration` to 0. `-op-registration-name` names the
hooks of dialects whose operations are generated from several files.
Dialects whose `initialize` would now be empty can set `hasInitializer`
to 0 instead of defining an empty one.
[9 lines not shown]
when choosing a channel for the server to sent ClientAlive probes to,
disregard channels that are in half-close state, as these won't
reply can cause the probes to never get a response. This could be used
to construct a DoS in fairly farfetched circumstances.
Anthropic ANT-2026-IFTX0I2F
[Object][SFrame] Initialize FrameRowEntry fields to fix -Wuninitialized (#245641)
SFrameParser::fres() constructs a "before begin" FallibleFREIterator
whose FrameRowEntry member has not been read yet, and then moves it into
make_fallible_itr(). Moving the iterator copies the indeterminate
StartAddress and Info fields, which GCC 15 (where LLVM no longer passes
-Wno-uninitialized) diagnoses with -Wuninitialized.
The values are always overwritten by inc() before being observed, so
this is not a functional bug, but copying indeterminate values is still
UB. Give the fields default member initializers.
Co-authored-by: Claude <noreply at anthropic.com>
Schedule client/server alive checked based on the time the last
packet was received rather than then the last data was recevied.
Avoids an attack where an attacker sends a corrupt packet length
that (probably) gets interpreted as a large packet, then dribbles
in data slowly and one byte at a time to prevent the alive timer
for killing the connection as unresponsible. Unlikely, yeah - I know.
Anthropic ANT-2026-HQ3U6925
backup libraries: fix the autoremove test
The test built libbar.so.1 with -lfoo but nothing referenced libfoo, so a
linker which drops unused libraries, as GNU ld does with --as-needed, did
not record the dependency. bar then did not require the library and
pkg autoremove removed the backup package, which is precisely what the
test asserted it would keep.
- reference a symbol of libfoo so that the dependency is always recorded
- assert that bar requires libfoo.so.1, so that the premise of the test is
checked instead of assumed
[ProfCheck] Disable test from 0588652 (#245911)
05886521609f3769fd11ec6fc16c820244978abc exposes an existing issue in
CGP that needs to be fixed. Adding to the xfail list so we can fix it
out of band and I don't get a buildbot failure email for every commit
for the next day.