[CIR] Add cir.min op and refactor cir.max lowering
Add cir.min operation for integer minimum computation. Refactor cir.max
lowering into a shared lowerMinMaxOp template reused by both ops. Includes
lowering tests for signed, unsigned, and vector types, plus canonicalization
tests.
[CIR] Split CIR_UnaryOp into individual operations
Split the monolithic cir.unary operation (which dispatched on a
UnaryOpKind enum) into four separate operations: cir.inc, cir.dec,
cir.minus, and cir.not.
This follows the same pattern used when cir.binop was split into
individual binary operations (AddOp, SubOp, etc.).
Changes:
- Add CIR_UnaryOpInterface with getInput()/getResult() methods
- Add CIR_UnaryOp and CIR_UnaryOpWithOverflowFlag base classes
- Define IncOp, DecOp, MinusOp, NotOp with per-op folds
- Add Involution trait to NotOp for not(not(x)) -> x folding
- Replace createUnaryOp() with createInc/Dec/Minus/Not builders
- Split LLVM lowering into four separate patterns
- Split LoweringPrepare complex-type handling per unary op
- Update CIRCanonicalize and CIRSimplify for new op types
- Update all codegen files to use bool params instead of UnaryOpKind
[6 lines not shown]
[CIR] Remove cir.unary(plus, ...) and emit nothing for unary plus
Traditional codegen never emits any operation for unary plus — it just
visits the subexpression as a pure identity at the codegen level. Align
CIRGen with this behavior by removing Plus from UnaryOpKind entirely
and having VisitUnaryPlus directly visit the subexpression with the
appropriate promotion/demotion handling.
[CIR] Add Commutative/Idempotent traits to binary ops
Add missing MLIR traits to CIR binary operations, matching the arith
dialect conventions:
- AndOp, OrOp: Commutative, Idempotent (fixes FIXME)
- AddOp, MulOp, XorOp, MaxOp: Commutative
Add these ops to the CIRCanonicalize pass op list so trait-based
folding is exercised by applyOpPatternsGreedily.
Update testFloatingPointBinOps in binop.cpp to use computed values,
preventing DCE of the now-canonicalized ops.
snprintb: allow 'F' and 'f' to be freely mixed with '=' and ':'
This restores the behavior from NetBSD 10.
While in most cases, 'f' is used with '=' and 'F' is used with ':',
there are useful cases for the other combinations as well, so allow
them.
Planned for pull-up to NetBSD 11.
*/*: Deprecate discontinued OSS Puppet components
As announced in the [2025Q4] status report, the legacy ports for Open
Source Puppet (which were abandonned by Perforce following the
aquisition of Puppetlabs), are now deprecated and scheduled for removal
in a few months.
Switching from Puppet to OpenVox is relatively straightforward: when
installing the replacement for a deprecated component, pkg(8) will
detect a conflict between the legacy component and the new one and will
prompt you to remove the deprecated package, which is the right course
of action.
For more details, refer to the [2025Q4] status report.
[2025Q4]: https://www.freebsd.org/status/report-2025-10-2025-12/#_openvox_puppet
With hat: puppet
virtual_oss: Use virtual_oss_delay_ns() to avoid duplication
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
(cherry picked from commit 3a410851bf02c247e71bcd06fdeec2706c6b6070)
virtual_oss: Use virtual_oss_timestamp() to avoid duplication
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
(cherry picked from commit e75c8faf277dded0a80d469cb8182583716a2211)
[StructurizeCFG] Fix incorrect zero-cost hoisting in nested control flow (#183792)
hoistZeroCostElseBlockPhiValues() hoists zero-cost instructions from
else blocks to their common dominator with the then block. When the
merge point has additional predecessors beyond the simple if-else
pattern, the hoisted instruction ends up in a dominator that feeds
a Flow phi on every edge, including edges where the else block was
never taken. simplifyHoistedPhis() then replaces poison entries in
those Flow phis with the hoisted value, causing it to leak into
unrelated paths.
This manifests as miscompilation in sorting kernels compiled with
code coverage: the PGO counter blocks create deeply nested CFGs
where the hoisted shufflevector (used for swapping sort keys)
reaches the no-swap path, corrupting sort results.
Fix by requiring a simple if-else CFG shape before hoisting: ThenBB
must branch directly to ElseSucc and ElseSucc must have exactly 2
predecessors. This matches the structure that simplifyHoistedPhis
assumes.
audio/noctavox: Add runtime dependency
- Add audio/alsa-plugins to RUN_DEPENDS, because without it noctavox
fails to start with the following error:
ALSA lib pcm.c:2722:(snd_pcm_open_noupdate) [error.pcm] Unknown PCM oss
thread 'main' (101801) panicked at noctavox/src/player/handle.rs:18:40:
Failed to initialize backend: output error: The requested device is no longer available. For example, it has been unplugged.
- Bump PORTREVISION