[libc++] Update release procedure for libc++ & friends (#210383)
The release procedure implied that some tasks were done by the release
manager, but in practice they are done by the libc++ developers.
Also, mention using the `llvm-premerge-libcxx-release-runners` runner
set on the release branch, which was overlooked in the previous notes.
Other than that, minor reformulations.
Write original source language when writing and reading AST (#209353)
FAIL: Clang :: Frontend/ast-main.c
FAIL: Clang :: Frontend/ast-main.cpp
were failing on z/OS; this change fixes these lit failures.
The issue here is that on z/OS the original source code language needs
to be passed through to the IR so that the backend can encode this
information in the PPA2 in the object file. That means that it needs to
be exported to the AST so that going from saved AST -> IR will carry the
language through.
[SelectionDAG][AArch64][X86] Don't scalarize vector smul.fix.sat/umul.fix.sat (#209351)
Vector SMULFIXSAT/UMULFIXSAT were not handled by expandFixedPointMul in
the vector legalizer (a FIXME) and were unrolled to per-lane scalar
code: a single <8 x i16> smul.fix.sat was ~100 instructions on both
AArch64 and x86.
Expand the saturating variants like the non-saturating ones, and build
the saturation clamp with SETCC + VSELECT for vector types so it stays
vectorized instead of being scalarized by SELECT_CC legalization. Scalar
lowering is unchanged: the clamp change is guarded on isVector(), so
scalar fixed-point codegen on every target is bit-identical.
Additionally custom-lower SMULFIXSAT on AArch64 for scale == eltbits-1,
which is exactly sqdmulh, to a single instruction.
To the FIXME note - results in a ~12x speedup over the unroll fallback.
AI was used in the making of this PR, and if its feedback is to be
[2 lines not shown]
[OFFLOAD][L0] Restore function pointer lookup. (#211520)
PR #201352 incorrectly removed the calls to zeModuleGetGlobalPointer
when looking up a symbol.
[analyzer][NFC] Remove unused ProgramStateRef local variables (#211517)
Several checkers and ExprEngine declare a ProgramStateRef local that is
never read (typically `State = C.getState();` immediately followed by
code that re-fetches the state directly). These are not flagged by
-Wunused-variable because ProgramStateRef has a non-trivial destructor.
Found with a clang-query matcher over clang/lib/StaticAnalyzer.
Assisted-by: claude
[VectorCombine] foldShuffleToIdentity - ensure we push any created instructions to the WorkList (#211508)
generateNewInstTree is recursive - ensure all new instructions are
pushed to the WorkList (and in the correct order).
I also renamed the local Worklist variable -> Candidates to stop
shadowing VectorCombine::WorkList - there's more "WorkLists" in
VectorCombine that need fixing but this was causing a particular
annoyance to this patch.
[analyzer][NFC] Remove leftover PreElideState stash in copy elision (#211518)
computeObjectUnderConstruction stashed the program state into
PreElideState "before trying to elide, as it'll get overwritten", but
never used it. That comment and stash are fossils of the old
prepareForObjectConstruction, which returned and threaded the state
(`std::tie(State, V) = ...`); the failure path then reverted it with
`State = PreElideState;`.
The refactor to the SVal-returning computeObjectUnderConstruction (State
is now passed by value and the state updates moved to
updateObjectsUnderConstruction) dropped that revert but left the stash
and comment behind. State is never overwritten here anymore, so remove
the dead PreElideState and reword the comment to describe only the
CallOpts stash, which is still needed (CallOpts is passed by reference
and genuinely overwritten by the elision attempt).
Found with a clang-query matcher over clang/lib/StaticAnalyzer.
Assisted-by: claude
[analyzer][Z3] Fix z3-bitint-arithmetic.c test RUN line (#211515)
I used to get these errors on M4 with `LLVM_ENABLE_Z3_SOLVER`:
```
error: 'expected-error' diagnostics seen but not expected:
File clang/test/Analysis/z3/z3-bitint-arithmetic.c Line 26: unsigned _BitInt of bit sizes greater than 128 not supported
File clang/test/Analysis/z3/z3-bitint-arithmetic.c Line 29: unsigned _BitInt of bit sizes greater than 128 not supported
```
Fixes up #210525
Another nail in the coffin of #184695
[NFC][clang][Driver] Add tests for --driver-mode=flang (#207658)
This patch intends to clarify the current behaviors, not to state the
expected/desirable behaviors.
---------
Co-authored-by: Tarun Prabhu <tarunprabhu at gmail.com>
[VectorCombine] Check load offsets in APInt before narrowing shuffle indices (#210904)
vectorizeLoadInsert narrowed the APInt element offset to unsigned before
checking its range. Large offsets could wrap and select the wrong vector
element.
Check the offset range as an APInt before converting it to the shuffle
index. This prevents invalid load widening and is covered by
a regression test.
Fixes #210903
[LoopUnroll] Make the list of supported recurrence kinds inclusive. (#210957)
This excludes Sub, AddChainWithSubs, FSub and FAddChainWithSubs
recurrence kinds by making the list of supported types opt-in as opposed
to opt-out. This will hopefully mean that as more recurrence kinds are
added in the future, the list supported by the unrolling remains valid.
Fixes #201065
[NFC][analyzer] Eliminate the NodeBuilder in VisitUnaryOperator (#211304)
This is part of the commit series to gradually remove the class
`NodeBuilder` from the analyzer codebase.
This was a relatively complex situation because there were many
different `generateNode` calls and two situations where the the node
from `CheckedSet` was left in `EvalSet` without changes (which is
implicit with the `NodeBuilder` but now requires explicit
`EvalSet.insert(N)` calls).
[RISCV] Add TuneNoDefaultUnroll to spacemit-x60 (#211502)
This feature has been added to generic CPUs in #135318 and we don't
see any significant regression on `spacemit-x60`.
[VPlan] Widen reverse unit-stride accesses in makeMemOpWideningDesc (NFCI) (#208807)
Update widenConsecutiveMemOps to also widen reversed consecutive
accesses (stride == -1), by creating a VPVectorEndPointerRecipe via
VPBuilder, load and reverse.
PR: https://github.com/llvm/llvm-project/pull/208807
[CostModel][X86] Add PCLMUL cost table (#211113)
The current cost modeling for X86 does not have `ISD::CLMUL` listed in
any cost table, so the cost for `llvm.clmul` falls back to the default
for `Custom`, which is twice the type legalization cost. Since `CLMUL`
uses the `xmm` registers with `pclmulqdq`, this operation is typically
much more expensive. Add a new table for PCLMUL to reflect this.
Note that AVX, AVX512, and VPCLMULQDQ are still not modeled correctly.
This is left as a FIXME for now.
Assisted-by: Claude Opus 4.8
[docs][tools][DirectX] Document DXContainer debug info parts (#204021)
This patch adds ILDB, ILDN, VERS, SRCI parts format documentation. It
describes how to use LLVM tools to inspect them. Additionally,
llvm-pdbutil documentation has been expanded with information on how to
inspect PDB files generated by the DirectX compiler.
AMDGPU: Use llvm-mc -triple= arguments instead of space separator
-triple=amdgcn.. is the dominant form over -triple amdgcn. Convert
the outliers for easier subarch triple conversion.
[AMDGPU] Add gfx13 support for v_cvt_pk_{fp8,bf8}_f16 (#211263)
GFX13 supports VOP1 and VOP3 forms of these instructions; GFX1250 keeps
its VOP3-only encoding.
Co-authored-by: Guo Chen <guochen2 at amd.com>