[InstCombine] Fix crash on dereferencing null insertion point (#216363)
Fix, add assertions and regressin test.
The issue occurred when trying to invert a phi inside a catchswitch
block, because there is no legal insertion point after the phi.
clang/AMDGPU: Don't emit target-features on AMDGCN-flavored SPIR-V
The spirv64-amd-amdhsa target unions every GPU's features in its feature
map so it can report builtins as available. The CodeGen doesn't have
any use of the target-features. Putting it into the IR just results
in an annoying to update test every time a new feature is added. The
ultimate SPIRV codegen doesn't do anything with it, and if it did
survive to AMDGPU codegen, it would be actively harmful.
This isn't an ideal solution. The target-features spam is also
noisy and useless in the AMDGPU case, but solving that is more
intricate because we do currently rely on this for some features,
most notably the wavesize.
Co-authored-by: Claude (Claude-Opus-4.8)
clang/AMDGPU: Use feature bitset instead of ArchAttr (#216674)
Convert from the legacy getArchAttrAMDGCN manual bitmask checks to using
the new generated bitset. These are the easy cases. sramecc and xnack
require more supporting work so will be done later.
Co-authored-by: Claude (Claude-Opus-4.8)
[mlir] Fix RemoveDeadRegionBranchOpSuccessorInputs producing invalid scf.for
RemoveDeadRegionBranchOpSuccessorInputs builds its tied-value sets from
RegionBranchOpInterface::getSuccessorOperandInputMapping, which is derived from
getSuccessorRegions. For an scf.for with a statically-known trip count of 1,
getSuccessorRegions drops the region->region back edge (the loop provably never
iterates back). That back edge is what forwards a yield operand to the region
iter_args, so without it an iter_arg and its corresponding op result are no
longer tied through a shared operand. The pattern then removes a dead iter_arg
without its (structurally required) result, producing an scf.for with
mismatched loop-carried counts:
'scf.for' op mismatch in number of loop-carried values and defined values
The greedy driver repairs this on a later iteration (InlineRegionBranchOp folds
the single-trip loop), so it is only observed with
MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS, which verifies the IR after every
pattern application. It shows up across Linalg tiling / pack-unpack /
convolution lowering and scf loop canonicalization; see issue #163599.
[15 lines not shown]
NAS-142227 / 27.0.0-BETA.1 / Drop kernel address refresh re-announcements in netlink monitor (#19510)
The kernel re-emits RTM_NEWADDR every time a router advertisement
refreshes an address lifetime. Each refresh became an ipaddress.change
event that restarted ix-vendor.service, every few seconds behind routers
with aggressive RA timers.
IFA_CACHEINFO carries creation and update timestamps that are equal only
for a brand new address, so refreshes are dropped at parse time with no
state tracking needed. Messages without cacheinfo pass through and
RTM_DELADDR is never filtered.
Restarts now allow a single waiter on the lock instead of silently
skipping, so the latest address state is always applied without piling
up. Verified against a live kernel on real hardware.
This was pointed out in
https://ixsystems.atlassian.net/browse/NAS-141358 and a fix was proposed
in https://github.com/truenas/middleware/pull/19401. This fix supersedes
that one.
Add a ValueCheck construction method that takes an SBValue (#216208)
Making ValueCheck's can be pretty tedious. But in cases where you are
checking an SBValue that comes from some complex operation, e.g. an
expression evaluation, you can arrange to have the result you expect as
another value in your test program. In that case, it would be much
easier to make a SBValue from the reference object, and then compare the
result against that reference ValueCheck.
This PR adds the valobj based ValueCheck and uses it to replace the
hand-crafted one in TestCPPExprResult.py.
---------
Co-authored-by: Med Ismail Bennani <ismail at bennani.ma>
[sanitizer] Skip hanging tests on NetBSD (#216712)
Several sanitizer tests hang indefinitely on NetBSD:
```
MemorySanitizer-Unit :: ./Msan-x86_64-Test
MemorySanitizer-Unit :: ./Msan-x86_64-with-call-Test
MemorySanitizer-X86_64 :: zero_alloc.cpp
ThreadSanitizer-x86_64 :: signal_cond.cpp
libFuzzer-x86_64-default-NetBSD :: reload.test
```
All of them loop and don't time out, so they need to be terminated
manually for `ninja check-all` to complete. To avoid this, this patch
skips the affected tests or subtests. Unfortunately, the Msan unit tests
still hang on exit in `__cxa_finalize` even if all subtests are skipped
with `llvm-lit -gtest_filter=-*`.
Tested on `x86_64-pc-netbsd11.0`, `x86_64-pc-freebsd15.1`, and
`x86_64-pc-linux-gnu`.
[CIR] Derive record padding from the member marks (#215176)r
Now that every record member carries a kind, the record-level `padded`
bool is redundant: a record is padded exactly when some member is marked
pad. Drop the parameter and answer `getPadded()` from the marks.
That also fixes `computeStructDataSize`, which had read the bool as "the
last member is tail padding" and so dropped a real member when padding
sat between two data members. It now drops the trailing run, so an
all-pad record sizes to zero.
Assisted-by: Cursor / claude-opus-5
Drop kernel address refresh re-announcements in netlink monitor
The kernel re-emits RTM_NEWADDR every time a router advertisement
refreshes an address lifetime. Each refresh became an ipaddress.change
event that restarted ix-vendor.service, every few seconds behind
routers with aggressive RA timers.
IFA_CACHEINFO carries creation and update timestamps that are equal
only for a brand new address, so refreshes are dropped at parse time
with no state tracking needed. Messages without cacheinfo pass through
and RTM_DELADDR is never filtered.
Restarts now allow a single waiter on the lock instead of silently
skipping, so the latest address state is always applied without piling
up. Verified against a live kernel on real hardware.
multimedia/handbrake: Update the VPL option description
after "Switch dependency from onevpl to libvpl" in eba41bee20b2.
PR: 297590 293561
Sponsored by: UNIS Labs
dwc2: Bring dwc2_wait_for_mode from upstream and use in dwc2_force_mode.
dwc2_wait_for_mode will wait upto 110milliseconds for the controller
to enter the expected mode.
This hopefully fixes
port-evbarm/60613: Recent dwc2 commit breaks usb based ethernet device...
Pull up following revision(s) (requested by rin in ticket #1327):
sys/dev/pci/pciconf.c: revision 1.57
sys/dev/pci/pciconf.c: revision 1.58
sys/dev/pci/pciconf.c: revision 1.59
pciconf: Fix alignments of device memory and I/O resources
Resources must be their-size-aligned. While here:
- Switch *align variable from int to more suitable integer types.
- Make some conditions clearer (NFC).
pciconf: Fix round-up logics for total sizes of bridge resources
The previous ones are valid only if alignments are 4K or 1M,
for I/O or memory, respectively.
pciconf: Sort resource windows in order of decreasing alignment
instead of size.
[8 lines not shown]
Pull up following revision(s) (requested by rin in ticket #418):
sys/dev/pci/pciconf.c: revision 1.57
sys/dev/pci/pciconf.c: revision 1.58
sys/dev/pci/pciconf.c: revision 1.59
pciconf: Fix alignments of device memory and I/O resources
Resources must be their-size-aligned. While here:
- Switch *align variable from int to more suitable integer types.
- Make some conditions clearer (NFC).
pciconf: Fix round-up logics for total sizes of bridge resources
The previous ones are valid only if alignments are 4K or 1M,
for I/O or memory, respectively.
pciconf: Sort resource windows in order of decreasing alignment
instead of size.
[8 lines not shown]
mdoc: Standardize SYNOPISIS section for drivers
Standardize driver manuals on the style used for 12 years in vt(4).
This brings SYNOPSIS across all FreeBSD manual sections into harmony
of meaning where where SYNOPSIS lists available options, and does not
contain prose. Adjust mdoc(7) to reflect the established convention.
Reviewed by: jhb
Discussed with: arch@ (marc.info/?l=freebsd-arch&m=176782215606871)
Differential Revision: https://reviews.freebsd.org/D54586
Interfaces: Assignments - add interface configuration settings in new assignments page. for https://github.com/opnsense/core/issues/10568
Refactor NetworkInterface model to reuse existing property names as much as possible, move from/to legacy logic into a custom fieldtype and store all legacy settings in a container named "pending" to ease reconfiguration and updating legacy configurations.
yes: Avoid static initialization
Our buffer is half a megabyte, but we are only initializing the first
two bytes. Switching from static to dynamic initialization moves it
from .data to .bss, greatly reducing the size of the binary.
Fixes: cf74b63d61b4 ("yes: Completely overengineer")
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D58890
Pull up following revision(s) (requested by skrll in ticket #417):
sys/external/bsd/dwc2/dwc2.c: revision 1.84
PR/60021: USB-only boot: uhub0 attaches but uhub1 never appears...
Update the dwc2 intial reset sequence to more closely match the upstream
driver - it's changed a bit in the last 10 years.
This reset sequence gets the device out of the state it's left in by the
RaspberryPI firmware when booting from USB.