[InstCombine] Allow same extract insert shuffle fold for all fixed zero vector types (#233370)
Currently in CollectShuffleMask(), we check for ConstantAggregateZero to
check for a zero vector. However, this does not check for floating point
zero vectors nor null pointer vectors.
I believe this was a side effect from transitioning from CAZ to
ConstantFP and ConstantPointerNull for float and pointer types.
Modify to use type independent zero vector check which can identify both
types allowing for the same transformation to take place independent of
Int/Float/Pointer type.
Since this is an extension of an existing transformation, test coverage
has been kept minimal.
[AArch64][GlobalISel] Ignore debug instructions when reusing carry. (#228128)
Ignore immediately in-between continuous block of debug instructions
when a carry-producing instruction precedes a carry-consuming operation
in AArch64 GlobalISel.
`emitCarryIn()` previously compared the carry producer directly against
`I.getPrevNode()`. As a result, inserting a debug-only instruction
(e.g., `DBG_VALUE`) between otherwise adjacent carry operations
prevented reuse of the `NZCV` flags produced by the previous
instruction. This caused instruction selection to unnecessarily
materialize the carry into a virtual register and reconstruct `NZCV`
before the following carry operation.
Walk backwards over consecutive debug instructions before performing the
adjacency check. Debug instructions do not modify `NZCV`, so they should
not prevent reuse of the existing carry flags.
#### Context
[18 lines not shown]
databases/lmdb: allow to install both 0.x and 1.x together
LMDB 1.0 and the legacy 0.9 ABI cannot be mixed, the datanase format are
incompatibles as well.
Rename or relocate everything databases/lmdb0 installs so that it no
longer overlaps with databases/lmdb:
- the utilities are now mdb_copy0, mdb_dump0, mdb_load0 and mdb_stat0
- the header is include/lmdb0/lmdb.h
- the linker name is liblmdb0.so, the shared object keeps its ABI name
liblmdb.so.0 so already linked programs are unaffected
- the pkg-config file is lmdb0.pc
A compatibility prefix holding the previous layout is also installed
under ${PREFIX}/lmdb0/ (include/, lib/ and libdata/pkgconfig/) so that
build systems which expect to find lmdb.h and -llmdb relative to a
single directory only need a path change.
Now all ports should migrate to lmdb 1.X and use the lmdb 0.9 port to ease
[6 lines not shown]
GlobalISel: Add a lowering of G_FCONSTANT to G_CONSTANT
RISCV and ARM both custom legalized G_FCONSTANT into a G_CONSTANT with
the same bits. Add LegalizerHelper::lowerFConstantAsConstant and use it
in both.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
SelectionDAG: Build FP immediates from integer bits in the legalizer
Teach the generic legalizer to legalize FP immediates as a bitcast of
an opaque integer constant. Migrate LoongArch to use the new helper
instead of doing it in custom lowering.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
CodeGen: Return how to materialize FP immediates from targets
Replace the isFPImmLegal target hook with getFPImmAction, which
returns whether an FP immediate is legal or how it should be
legalized. This will allow adding a way for the legalizer to build an
immediate from its integer bits, instead of each target doing so in
custom lowering or selection.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
audio/cliamp: New port: Retro terminal music player inspired by Winamp 2.x
cliamp is a retro terminal music player inspired by Winamp 2.x. It plays
local files, internet radio streams, podcasts and online services
(YouTube, SoundCloud, Spotify, Navidrome, Jellyfin, Plex and more), and
offers a spectrum visualizer, a parametric equalizer and a playlist
manager. It exposes an MPRIS D-Bus interface for desktop media keys.
WWW: https://github.com/bjarneo/cliamp
Reported by: jkh (new maintainer)
Pull Request: https://github.com/freebsd/freebsd-ports/pull/630
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
x11/libwinpos: Add new port: Client-side window positioning hint library
libwinpos implements the xx-zones-v1 Wayland protocol to let applications
request where their windows should be placed within a compositor-provided
zone.
WWW: https://github.com/ximion/libwinpos/
sysutils/herdr: New port: Terminal workspace manager for AI coding agents
Herdr is a terminal workspace manager for AI coding agents. It runs
agents such as Claude Code, Codex, and others in panes of a persistent
server session that clients attach to and detach from, detects which
agent is running in each pane and whether it is working, waiting, or
done, and notifies you when an agent needs attention. Terminal emulation
is provided by the vendored libghostty-vt library.
WWW: https://github.com/herdrdev/herdr
Reported by: jkh (new maintainer)
Pull Request: https://github.com/freebsd/freebsd-ports/pull/630
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[InstCombine] Canonicalize atomicrmw sub of a constant to add
Rewrite `atomicrmw sub ptr, C` as `atomicrmw add ptr, -C`. This
matches the canonical form InstCombine already uses for plain `sub`.
In wrapping arithmetic $old - C = old + (-C)$, so both the stored
value and the returned old value stay the same, including when C is
`INT_MIN`. Ordering, syncscope and metadata are kept.
```llvm
; before
%old = atomicrmw sub ptr %p, i32 1 syncscope("agent") monotonic
; after
%old = atomicrmw add ptr %p, i32 -1 syncscope("agent") monotonic
```
This benefits AMDGPU, for example: https://godbolt.org/z/39xsYro3o
[mlir][flang][OpenMP] Privatize LINEAR list items with linear privatizers; support ALLOCATABLE (#228827)
Flang miscompiled `LINEAR` on an `ALLOCATABLE` list item (#182401). The
linear
operand was the descriptor reference, but `linear_var_types` held the
element
type, so translation created an undersized private copy and the program
crashed.
This patch makes linear list items use privatizer recipes, the same way
`private` and `reduction` do.
**MLIR**
- The `linear` clause on `omp.wsloop` and `omp.simd` now carries a
privatizer
symbol and an entry block argument for each list item:
```mlir
omp.private {type = linear} @x.linear : i32
omp.simd linear(@x.linear %x -> %arg0 : !llvm.ptr = %step : i32)
[34 lines not shown]
sysutils/lazydocker: New port: Terminal UI for both docker and docker-compose
lazydocker is a simple terminal user interface for managing Docker and
docker-compose. It shows containers, images, volumes and services in one
window, streams their logs and stats, and lets you restart, stop, remove
or attach to them with single keystrokes instead of remembering long
docker command lines.
WWW: https://github.com/jesseduffield/lazydocker
Reported by: jkh (new maintainer)
Pull Request: https://github.com/freebsd/freebsd-ports/pull/630
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
databases/pg_failover_slots: New port
pg_failover_slots copies logical replication slots from a primary to its
physical standbys, so logical replication consumers can carry on after a
failover instead of losing their slot. Load it with shared_preload_libraries
on the primary and on every standby. CloudNativePG uses it for replica
clusters.
WWW: https://github.com/EnterpriseDB/pg_failover_slots
Reviewed by: acm
Approved by: acm (mentor)
Differential Revision: https://reviews.freebsd.org/D60877
[AArch64][TTI] Cost extends folded into [US]SHLL as free (#233489)
A doubling NEON zext/sext feeding a shl by a splat immediate
is selected as one [US]SHLL/SHLL, so the extend is free.