[NewGVN] Don't propagate pointer equality that changes provenance (#243752)
NewGVN's PredicateInfo evaluation turned `on this edge, %p == @g` into a
value-numbering equivalence without checking that the two pointers are
interchangeable. Guard against this using canReplacePointersIfEqual().
Fixes #234099.
[X86][Znver4] Remove the scheduling override for (V)PSHUFB instructions on Zen4 (#246422)
In #244230 it was observed that bit certain shuffling instructions (to
be specific, the ones mathching (V)PSHUFB) on Zen4 have wrong scheduling
parameters eg. RThroughput is 1.0, but it should in fact be 0.5
(according to uops.info).
The fix is to remove the override for
(V?)P(SHUFB)(Y|Z|Z128|Z256?)(rr|rrk|rrkz) in Zn4WriteSHIFTrr which makes
it fallback to the default WriteVarShuffle* classes which have correct
RThroughput.
Verified with llvm-exegesis
AI was used primarily as a learning tool to answer my questions. This is
effectively one line removal and most of the code changes were done by
automated scripts to keep up tests in sync.
[LoopPeel] Register cloned assumptions with the AssumptionCache (#245493)
peelLoop clones the loop body, including llvm.assume calls, but did not
register the clones with the AssumptionCache it is given. The cache
requires passes that create assumptions to call registerAssumption(),
and it is never invalidated, so after peeling it was missing the peeled
assumptions for the rest of the pipeline. Register the clones the same
way UnrollLoop and UnrollAndJamLoop do.
IndVarSimplify/scev-update-loop-opt.ll: the peeled assumption was false
(icmp sgt i64 0, 0). Once it was registered, later passes removed the
code that reaches the genLoopLimit truncation that the test covers
(#181296). Use sge so that the assumption holds and the test keeps that
coverage.
Fixes #245484.
[OpenMP] Emit all runtime calls through createRuntimeFunctionCall (#246047)
Sixteen call sites emitted their OpenMP runtime call with `CreateCall`
instead of `OpenMPIRBuilder::createRuntimeFunctionCall`, so they missed
the runtime calling convention that the helper sets. On SPIR-V, these
calls disagreed with the spir_func convention of their callees. Route
them through the helper.
Two callsites pass the call name as a Twine, which cannot be converted
to the StringRef that `createRuntimeFunctionCall` took. It now takes a
`const Twine &`, as `IRBuilder::CreateCall` does.
---------
Co-authored-by: Cursor <cursoragent at cursor.com>
[X86] SimplifyMultipleUseDemandedBitsForTargetNode - skip unnecessary (VSRAI (VSHLI X, C1), C1) SIGN_EXTEND_INREG patterns (#246651)
If we're sign extending into the upper bits, but never demanding them,
then skip the shift-pair
Yak shaving for #245048
iflib: Drain the receive watchdog callout on detach
Nothing stops ifr_watchdog when an interface goes away. If it is armed
when the interface detaches, the callout stays on the callout wheel
after iflib_rx_structures_free() has freed the queue containing it,
corrupting the wheel, or fires and enqueues a task that has already been
detached.
The window is small: the callout is armed for one tick, only when a
receive buffer refill fails, and the detach has to follow right after.
The former iflib_pseudo_deregister() drained the callout until
102540192c71 moved its teardown into iflib_tqg_detach() without the
drain, and iflib_device_deregister() never did. Drain it in
iflib_tqg_detach(). The callout cannot be rearmed by then:
_task_fn_rx() only arms it while the interface is running, and
iflib_device_deregister() has already called iflib_stop(), which clears
the running state and then drains the receive tasks.
[5 lines not shown]
iichid(4): Expect I2C address provided by iicbus(4) to be in 8-bit
format rather than in 7-bit to chase "acpi_iicbus: shift the ACPI slave
address into the form iicbus(4) stores" commit.
acpi_iicbus: shift the ACPI slave address into the form iicbus(4) stores
An I2cSerialBus resource carries the 7-bit slave address, but iicbus(4)
stores and passes around the 8-bit form -- ofw_iicbus(4) shifts a device-tree
"reg" value for the same reason, and the AML address space handler in this
file already shifts before issuing a transfer. Without the shift every
device enumerated from ACPI is addressed at half its address, and a driver
that probes by reading a register sees no ack.
Reviewed by: wulf
Differential Revision: https://reviews.freebsd.org/D60062
[VectorCombine] Fix crash on bitcasts of pointer vectors
foldBitcastShuffle divides by the scalar sizes of the source and
destination element types, which are zero for pointers. A bitcast of a
shuffled pointer vector, or one between a byte vector and a pointer
vector, then crashes with a division by zero. Skip the fold for pointer
elements.
Fixes #246659
Assisted-by: Claude Code (Claude Opus 5.5)
[analyzer][docs] Add a release note for the performance improvements (#246650)
Assisted-by: Claude Opus 5.5
---------
Co-authored-by: Gabor Horvath <gaborh at apple.com>
monit: allow skipping service checks during a cron window (not every) (#11337)
Monit supports `not every "<cron>"` next to `every "<cron>"`: the
service is skipped while the schedule matches and checked at all other
times, e.g. to pause a check during a nightly job that briefly stalls
the service. Only one of the two can be set per service, so add a
"Poll Time Mode" option to choose how the Cron-style Poll Time is
applied. The default keeps the current `every` behaviour.
[analyzer] Sanitize handling of currStmtIdx (#243897)
The index of the currently analyzed `CFGElement` within the current
`CFGBlock` was stored in the data member `unsigned currStmtIdx` of
`ExprEngine`. However, when the current analysis step does not analyze a
`CFGElement` (e.g. it handles the terminator of a block), there is no
meaningful "current statement index" and `currStmtIdx` held a stale
value from the last analyzed statement.
To make this "not always meaningful" property explicit, replace
`unsigned currStmtIdx` with `std::optional<unsigned> CurrStmtIdx` (also
adjusting the capitalization).
Now operations that are only meaningful while analyzing a `CFGElement`
trigger an assertion failure instead of silently reusing a stale index.
On the other hand `ExprEngine::getCFGElementRef()` is updated to return
an element ref with the invalid statement index `UINT_MAX` when not
analyzing a `CFGElement`. This is useful because the result of this
[28 lines not shown]
powerpc64: Fix disappearing low memory on radix MMU systems (POWER9)
The FreeBSD radix implementation piggybacks on the physical memory
allocation function from the HPT implementation, but did not share
the same state information for number of physical memory ranges.
This led to a situation where the HPT physical memory allocator
would attempt to shift the physical memory ranges in the shared
range table, but would use the wrong number of entries, thus
overwriting the large segment of low memory that should have been
available for e.g. 32-bit DMA.
Incorrect physical memory map:
real memory = 33997058048 (32422 MB)
available KVA = 34359619583 (32767 MB)
Physical memory chunk(s):
0x0000000000003000 - 0x0000000000002fff, 0 bytes (0 pages)
0x000000000000e000 - 0x000000000000ffff, 8192 bytes (2 pages)
0x0000000000094000 - 0x0000000000ffffff, 16171008 bytes (3948 pages)
[28 lines not shown]
powerpc64: Fix disappearing low memory on radix MMU systems (POWER9)
The FreeBSD radix implementation piggybacks on the physical memory
allocation function from the HPT implementation, but did not share
the same state information for number of physical memory ranges.
This led to a situation where the HPT physical memory allocator
would attempt to shift the physical memory ranges in the shared
range table, but would use the wrong number of entries, thus
overwriting the large segment of low memory that should have been
available for e.g. 32-bit DMA.
Incorrect physical memory map:
real memory = 33997058048 (32422 MB)
available KVA = 34359619583 (32767 MB)
Physical memory chunk(s):
0x0000000000003000 - 0x0000000000002fff, 0 bytes (0 pages)
0x000000000000e000 - 0x000000000000ffff, 8192 bytes (2 pages)
0x0000000000094000 - 0x0000000000ffffff, 16171008 bytes (3948 pages)
[28 lines not shown]