[Mips] Legalize vector UNDEF instead of expanding to zero BUILD_VECTOR (#211503)
Currently, MIPS MSA expands ISD::UNDEF into a BUILD_VECTOR of all zeros
during legalization. This creates an infinite loop in DAGCombiner when
the following occurs:
1.Mips lower BUILD_VECTOR expands non-splat vectors into
INSERT_VECTOR_ELT with creating undef node
2.Then legalization expands UNDEF back to BUILD_VECTOR zero
3.Mips lower BUILD_VECTOR converts zero vector to BITCAST
4.DAGCombiner optimizes BITCAST(zero) to UNDEF
5.Back to step 2, infinite loop
Fix #210229.
[Mips] Fix getInstSizeInBytes for instructions with delay slots (#216665)
MIPS branch/jump instructions (B, BEQ, JALR64Pseudo, PseudoReturn64,
etc.) have a delay slot. The actual encoded size is 8 bytes (instr +
NOP). This fixes "out of range PC16 fixup" errors on large functions.
This issue was exposed in llvm 23 by commit pr #191460 which changed
MipsBranchExpansion to use MBB::iterator instead of instr_iterator,
making the MBB size calculation more accurate and revealing the
pre-existing bug.
Thanks for the pr #187703 `AllowOverEstimate` to help find instr which
actual size mismatch expected size .
Fix #112010.
[BOLT] Fix overflow issue when using absolute addressing in LSDA (#216654)
Currently, in the emitLSDA() flow, signed data is used when using
absolute addresses to update the LSDA for non PIE/DSO. But when the PC
is higher than 0x7fffffff(2GB), this will be sign-extended into an
invalid 64-bit address. Especially when the output binary is large,
silent errors can easily occur (we have met this problem in real
scenarios).
So this patch changes the signed data to unsigned data, thereby fixing
the incorrect address extension like this:
```
.gcc_except_table
LSDA:
LPStartEncoding: DW_EH_PE_omit // No LPStart
CallSiteEncoding: DW_EH_PE_sdata4 -> udata4 // Changed from sdata4 to udata4
call-site table:
call-site 1:
start = ...
[4 lines not shown]
[IR] Autoupgrade trivial VP intrinsics to their non-VP counterparts (#212490)
As a first step towards removing trivial VP intrinsics, autoupgrade them
to their non-VP counterparts for backwards compatibility. Subsequent PRs
can then remove the intrinsics themselves.
Since trivial VP intrinsics only set lanes to poison, it's safe to
replace them with non predicated versions.
RFC: https://discourse.llvm.org/t/rfc-remove-trivial-vp-intrinsics/90972
[CIR] Destroy a static local's extended temporary in its cir.local_init (#216210)
A temporary lifetime-extended by a function-local static had its
destructor hung off the cir.global, which the verifier rejects: a static
local is initialized and destroyed in-function under its guard, via
cir.local_init. Thread the region emitCXXSpecialVarDeclInit already
picks down to pushTemporaryCleanup, which registers into it in reverse
construction order.
Fixes SPEC2026: yaml-cpp's IsValidPlainScalar (736.ocio_r,
772/872.marian).
build: Fix debian package version omitting git commit for git builds
When building debian packages the git commit tag gets stripped off.
The immediate cause is from commit 1a33036df ("Add --bump=0 to alien").
According to the commit message, this was done to preserve the release
field, which "--bump=0" does not do. It correctly notes that '_' is an
invalid character for debian version strings.
Instead use '.' as a separator in the release instead of '_'. This is
valid for both DEB and RPM packages.
Replace "--bump=0" with "-k" to keep the release string from the RPM
unmodified when using it to form the DEB version.
Fixes: 1a33036df ("Add --bump=0 to alien")
Fixes: f6fb7651a ("Use 'git describe' for working builds")
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Glenn Washburn <development at efficientek.com>
Closes #18938
comms/mbpoll: New port
mbpoll is a command line utility to communicate with ModBus slave
(RTU or TCP).
mbpoll can:
read discrete inputs
read and write binary outputs (coil)
read input registers
read and write output registers (holding register)
The reading and writing registers may be in decimal, hexadecimal or
floating single precision.
[SLP]Add extractelement as a main opcode for copyables
Model a bundle of extractelements from a common vector plus a foreign scalar
as a copyable node: matching lanes reuse the source vector and copyable lanes
are inserted into it. Limited to the identity extract order without a reuse
shuffle, other cases fall back to gather.
Fixes #192849
Reviewers: RKSimon, bababuck
Pull Request: https://github.com/llvm/llvm-project/pull/216503
[AMDGPU] Optimize SGPR splat reg sequences for packed 64-bit instructions (#217182)
This work optimizes SGPR register sequences for packed 64-bit instructions by eliminating
redundant register copies when a scalar value is splatted across multiple lanes.
The optimization is implemented in SIFoldOperands::tryFoldSGPRSplatRegSequence, which:
1. Detects SGPR register sequences where all elements are identical
2. Verifies all uses are packed 64-bit instructions supporting single
SGPR read
3. Replaces redundant elements with undef to allow copy elimination
This reduces SGPR register pressure and eliminates unnecessary copies in
kernels using packed operations with splat scalars.
NAS-142151 / 26.0.0-RC.1 / Resolve migrated USB devices by their vendor and product ids (#19494)
## Problem
A USB passthrough device is named after the port it is plugged into,
which is what 25.10 stored. The 26.0 pre-releases built the same shape
of name out of the bus and device number instead — an enumeration
counter the kernel reissues on every replug — so those stored values
name a port nobody chose.
The incus migration has the same preference the same way round: it
resolves a device by the bus and device number the manifest carries and
only falls back to the vendor and product ids when those are missing. It
picks the counter that gets reused over the identity that survives a
replug, and because it runs exactly once per machine and is never run
again, a wrong row it writes stays wrong. There is no second run, no
manifest retained afterwards, and no repair path.
This matters for a population that has not been hit yet:
[33 lines not shown]
Allow pool import with corrupted spare/l2arc configs
That information should not be critical for read-only imports, and
imports with zfs_recover. Let the import proceed by just dropping
those devices and trying to recover it with small space leak.
While there, allow zdb to report errors when dumping those objects.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Alexander Motin <alexander.motin at TrueNAS.com>
Closes #18937