[AArch64] Add guard for INSvi64lane lane in peephole opt (#240156)
This is unlikely to come up as a problem, but make sure that the lane we
insert
zero into is the top lane.
[OpenMP] Fix context selector matching and scoring (#231668)
OMPContext computes some context selector scores differently from the
OpenMP 5.2 rules in "Matching and Scoring Context Selectors", and
crashes on some selectors. Fix the following; each can change which
variant is selected:
- Device weights. kind, arch, and isa are worth 2^l, 2^(l+1), and
2^(l+2), where l is the depth of the construct context. OMPContext
used the candidate's own construct selector count, so inside two
nested parallel regions kind(cpu) was worth 1 instead of 4 and lost
to vendor(score(2): llvm).
- Scores per selector. A score belongs to a trait selector, but it was
added once per property, so vendor(score(10): llvm, amd) counted 20.
Scores now add once, using arbitrary-width arithmetic instead of
wrapping 64-bit sums.
- Repeated constructs. When a construct selector can match several
enclosing constructs, the highest-valued complete match counts.
construct={parallel} inside three nested parallel regions now adds 2^2
[30 lines not shown]
Harden container image pull
## Problem
Pulling a container image leaked raw `requests` errors, had no timeout on the tarball download so a stalled stream hung forever, and never checked the published sha256. Aborting `container.create` was ignored by the pull it was waiting on, and two concurrent pulls of the same uncached image could destroy each other's in-progress dataset through the orphan cleanup.
## Solution
- **Error wrapping**: registry index failures are raised as a readable `CallError` instead of a raw `requests` exception.
- **Timeout**: the tarball download uses `INTERNET_TIMEOUT`, so a stall fails the pull and the image dataset is destroyed.
- **Checksum**: the download is hashed as it streams and compared against the registry's sha256 before anything is extracted.
- **Registry lookup first**: the image/version lookup happens before `ensure_datasets`, the orphan destroy and the dataset create, so an unknown image or unreachable registry never touches a dataset. Cached images still return early without network access.
- **Abort**: the pull checks for abort in the download and extract loops. `container.create` aborts its pull job when it is cancelled, and raises `JobCancelledException` if the pull was aborted on its own.
- **Per-image lock**: `container.image.pull` holds a lock keyed on pool, name and version with `lock_queue_size=None`, so each create waits for its own pull job and a waiter after a successful pull hits the cached snapshot.
similar to em(4), do not deallocate the rings in DVACT_SUSPEND, but
pesist them through the suspend/resume, and reuse in DVACT_RESUME
(to avoid sleeping allocations which are not allowed)
ok jan
add addresses to log lines
this should help stateless log ingesters to correlate a source to a
failure.
from -portable, by Pietro Cerutti (gahr at gahr.ch)
[LoongArch] Fix misaligned frame-index offset for vldrepl.{h,w,d} (#239516)
eliminateFrameIndex did not check that the final offset is a multiple of
the access size for [X]VLDREPL_{H,W,D}, so a byte-aligned stack object
could produce an unencodable immediate. Materialize the address in a
scratch register in that case, as is already done for [X]VSTELM_*.
Assisted-by: LLM
Fixes #239508
(cherry picked from commit 3ade2bcaa2f31acdf4011e965d5ae39c39796671)
[LV] Add tests for FindLast reductions with nested phis (NFC). (#230640)
Add tests where the data value of a FindLast reduction is itself a phi
that yields the reduction phi on some paths, e.g. via a nested if. Both
are currently miscompiled, as the outer condition is used as the
condition for updating the reduction.
Also enable masked memory ops and regenerate checks with the latest UTC
version to make checks more compact without loss of generality.
(cherry picked from commit 2f272fc322cdc1fe1fbb667cd2cb6abddeb0eb9b)
[VPlan] Bail out on FindLast reductions with extra phi users. (#230676)
handleFindLastReductions uses the mask of the single non-phi incoming
value of the find-last blend as the condition for updating the
reduction. If the data value itself is the reduction phi on some paths,
e.g. via a nested blend for an inner if, the mask is also true for lanes
that keep the old value, and extract-last-active may then pick a stale
lane.
Conservatively bail out if the reduction phi has users other than the
find-last select/blend and the header mask select.
(cherry picked from commit 79caa03343df4da7b8ae0338d932125ef4bcf20b)
[flang][OpenMP] Fix DECLARE_SIMD warning annotations in linear-clause01.f90
release/23.x picked 2cc5b8ca (warn on ignored DECLARE_SIMD) before
94467edd (REF modifier verification), the reverse of their order on main.
2cc5b8ca therefore annotated only Case 1-4, and 94467edd later appended
Case 5-7 without the warning annotation, failing check-flang at lines
76/83/90.
Assisted-by: Claude
[AsmPrinter] Emit null pointer vector splats as zero bytes (#235980)
Emitting a global such as `@x = global <2 x ptr> zeroinitializer` with
`llc -data-sections -filetype=obj` asserts on 64-bit targets.
`ConstantPointerNull` can represent a vector splat since #195486, but
AsmPrinter passes the entire allocation size to
`MCStreamer::emitIntValue`, which accepts at most eight bytes.
Route pointer-vector splats through `emitGlobalConstantVector`, matching
the existing handling of integer and floating-point splats. Its
zero-value path emits the full allocation with `emitZeros`. Keep scalar
pointers on the existing `emitIntValue` path.
Fixes #235977
Assisted-by: OpenAI Codex
(cherry picked from commit fed20e0e68323be32cb0fe8af679b8cb34e72112)
[DAG] LowerShiftByScalarImmediate - early out for shift-by-zero cases (#237365)
Also, add assertions to getGFNICtrlImm that we don't try to shift by
zero
Fixes #235663
(cherry picked from commit 4eff20caf9ca079c6c779f1a0029e7a8f86f4790)
[X86] incDecVectorConstant - use ++/-- prefix operator to increment/decrement (#237176)
Don't just add immediate as it might not promote correctly to types
greater than 64-bits
Fixes #236021
(cherry picked from commit f64f3ea8f0f456790399fb50c7df368eafd26686)
Update llvm/test/CodeGen/AArch64/stack-coloring-alignment.ll
Fix test failure due to release/23.x not containing @tomershafir's change that prints labels in the ScheduleDAG output.
Co-authored-by: Nathan Corbyn <me at nathancorbyn.com>