[LV] Only charge legacy cost of forced scalars VPlan replicates. (#244725)
The legacy cost model charges forced scalars VF times their scalar cost,
even if VPlan folds them, hoists them or keeps them single-scalar. Only
pre-compute the legacy cost for forced scalars VPlan replicates per
lane; the VPlan cost model handles the rest.
This matches the existing behavior for InstsToScalarize.
Most test changes are due to no longer charging VF copies of `add %iv,
0` in the X86 interleave cost-model tests, which VPlan folds.
PR: https://github.com/llvm/llvm-project/pull/244725
[analyzer] Avoid printing names in CallDescription::matchNameOnly (#244863)
CallDescription::matchNameOnly printed the name of every constructor,
destructor and operator call into a string to compare it against each
CallDescription. Reject operator names unless the description starts
with "operator" and destructor names unless it starts with '~', and
compare constructor and destructor names to the record identifier, which
is what printing them yields for named records.
On some LLVM TUs (GVN, LiveVariables, RegionStore, SemaExpr) this
reduces the instructions of the static analyzer by 0.4-1.0% and the
cycles by 0.4-1.1%; peak memory is unchanged within noise. The
diagnostics are unchanged.
Assisted-by: Claude Opus 5.5
---------
Co-authored-by: Gabor Horvath <gaborh at apple.com>
[SCEV] Fold urem by multiples of vscale using vscale_range. (#245058)
vscale is a power of 2 that is at most the maximum from vscale_range, so
X urem (C * vscale) is 0 if X is a multiple of C * max(vscale).
This pattern is something that is useful when trying to reason about
remainders of trip counts in the loop vectorizer.
PR: https://github.com/llvm/llvm-project/pull/245058
[AMDGPU][NFC] Precommit tests for long-branch return-address clobbers (#244501)
Capture the current scratch reservation and scavenging behavior before
fixing the return-address clobber.
editors/vscode: Update to 1.147.0
The upstream has switched the layout of node modules
installation (nodeLinker setting) from hoisted to isolated. Changes
have been made to chase the change.
While here, drop unused dependencies.
Changelog: https://code.visualstudio.com/updates/v1_147
Reported by: GitHub (watch releases)
[OpenMP][OMPIRBuilder] Use the runtime CC for list<->global reduction helpers
#195911 gave the shuffle-and-reduce, inter-warp-copy and reduction
functions Config.getRuntimeCC(), which is spir_func on SPIR-V. The
list<->global helpers, which __kmpc_gpu_xteam_reduce_nowait calls through
the same kind of function pointer, kept the C calling convention, and so
did the two direct calls to them:
before after
define _omp_reduction_list_to_global_copy_func C RuntimeCC
define _omp_reduction_global_to_list_copy_func C RuntimeCC
define _omp_reduction_global_to_list_reduce_func C RuntimeCC
call list_to_global_copy (scratch copy-in) C RuntimeCC
call global_to_list_copy (scratch copy-back) C RuntimeCC
The device runtime calls the first three through ListGlobalFnTy pointers
(openmp/device/src/Reduction.cpp), i.e. with spir_func on SPIR-V.
RuntimeCC is C on all other targets, so their IR does not change.
emitListToGlobalReduceFunction() has no callers and is left as is.
[2 lines not shown]
[Attributor] Keep the calling convention when replacing an indirect call
When AAIndirectCallInfo knows the callee of an indirect call but cannot
promote the call (isLegalToPromote() fails), it creates a new direct call
with CallInst::Create(), which has the C calling convention:
define spir_func i32 @cb()
call spir_func void %fn() ; %fn = @cb
-passes=attributor call void @cb() (1)
-passes=attributor,instcombine store i1 true, ptr poison (2)
(1) does not match the callee's calling convention, so InstCombine
replaces it with (2). Copy the calling convention of the original call, as
promoteCall() keeps it when it changes the call in place.
On spirv64, OpenMPOpt runs the Attributor on the device runtime's
reduction code. Its spir_func calls of the shuffle-and-reduce and
inter-warp-copy callbacks cannot be promoted (a pointer argument's address
[6 lines not shown]
[SPIRV] Don't mark the barrier intrinsics nosync
The six llvm.spv.*memory.barrier* intrinsics are DefaultAttrsIntrinsics,
which makes them nosync. All six lower to OpMemoryBarrier or
OpControlBarrier with AcquireRelease semantics (selectBarrierInst() in
SPIRVInstructionSelector.cpp), so they do synchronize with other
invocations. amdgcn.s.barrier and the NVVM barriers are not nosync either.
Keep the other defaults and drop nosync:
declare void @llvm.spv.group.memory.barrier.with.group.sync()
before: convergent nocallback nofree nosync nounwind willreturn
after: convergent nocallback nofree nounwind willreturn
With nosync, OpenMPOpt deletes the workers' loop in a generic-mode OpenMP
kernel on spirv64-intel at -O3:
#pragma omp target teams distribute // generic mode
for (...) {
[14 lines not shown]
[ValueTracking] Add vector support to `computeKnownBitsFromEuclideanRem` (#241890)
Support vectors when inferring that Euclidean remainder expressions R +
(R < 0 ? A : 0) are non-negative, where R = srem X, Y and A is either Y
(when known non-negative) or abs(Y). Enables folding comparisons of the
result against zero. Respects demanded lanes when checking divisor
non-negativity.
Follow-up on #236900, which fixed #224449 for scalars.
expat: update to 2.11.0.
Release 2.11.0 Mon November 23 2026
Security fixes:
#1492 CVE-2026-124317 -- Fix overread in unknown encoding decoder
It needs use of `XML_SetUnknownEncodingHandler` to be
affected.
#1502 CVE-2026-128241 -- xmlwf: Plug symlink attacks with the
`-d <directory>` mode. The xmlwf CLI of libexpat was
vulnerable to symlink attacks in the `-d <directory>` mode
with a target directory writable by other users, e.g. /tmp.
The attack allowed truncation or overwriting the symlink
target file depending on the well-formedness of the XML
being parsed.
#1519 CVE-2026-134703 -- Malformed UTF-16 content ending in
isolated high surrogates could be passed to character data
and default handlers depending on their location in the
parsed document and could cause arbitrary damage depending
on the handler code in the application using libexpat.
[88 lines not shown]
[CIR] Add ABI vector kind tracking in cir::VectorType (#244303)
This adds a default-value field in cir::VectorType to track the ABI
vector kind. The default value is `Generic` meaning that the behavior
is, as it was before this change, not sub-type specific. This will be
needed during calling convention lowering for correct classification of
SVE types. The calling convention handling for SVE types will be added
in a later change.
Assisted-by: Cursor / claude-opus-5.5
[InstCombine] SimplifyDemandedVectorElts - add llvm.vector.shuffle handling (#245249)
Simplify the demanded elements of the mask operand using DemandedElts,
and use the mask's constant range to limit the demanded source elements.
This is the InstCombine equivalent of #244921.
Part of #244310
AI Note: I've used Claude Code to help me understand `InstCombine`
concepts and the codebase. The implementation and tests are my own.
[LangRef][llubi] Fix nsz handling for FP min/max intrinsics (#245117)
For FP min/max intrinsics and reductions, nsz only makes the order of
+0.0 and -0.0 non-deterministic and must not flip same-sign zeros. Clear
nsz before handleFMFFlags on inputs and handle opposite-sign zeros in
applyFPMinMax instead. Also clarify in LangRef that
llvm.vector.reduce.{fmaximum,fminimum} follow the same nsz semantics.
Fixes https://github.com/llvm/llvm-project/issues/233676
LLM used for test cases.
[AMDGPU] Don't unroll memcpy loops with sub-dword split accesses
If dword accesses aren't allowed at the copy's alignment, the unrolled
<64 x i32> loop is split into bytes, which causes heavy spilling. Only
unroll when dword accesses are allowed, and pick residual types the
alignment allows.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[BOLT][AArch64] Enable clustered branch relaxation by default (#234932)
Use clustered relaxation by default when code relocations are available,
and keep --relax-exp as a hidden alias. Without relocations, fall back to
local branch relaxation or stub-insertion pass unless clustered relaxation
was explicitly requested, in which case exit with an error message.
Allow clustered relaxation to handle short-range branches without
requiring the --compact-code-model option.
Move tests that are exclusive to stub-insertion pass into a separate folder.
Link with test/Inputs/stub.c in eh-frame-hdr.test and eh-frame-overwrite.test
to avoid external-call thunks, whose FDEs would prevent the unwind sections
from being rewritten in place when using clustered relaxation.
[AMDGPU][Clang] Support the RF inline asm constraint (#244752)
Accept the AMDGPU-specific "RF" (flat memory address) inline asm
constraint in clang and lower it to "^RF" in IR. The backend support was
added in #241996. The "m" constraint needs no clang change since it is
handled by the generic TargetInfo code.
Add Sema tests for valid and invalid uses of "RF", and CodeGen tests
checking the IR constraint strings for "RF" and "m". Document "RF" in
the AMDGPU section of LangRef.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>