[lldb-dap] Rename StackFrame.compileUnitId to $__lldb_compileUnitId (#239565)
use the `$__lldb_` prefix in the the compileUnitId field to match the
existing convention.
The attribute is not used yet in public releases.
[SelectionDAG] Refactor WidenVecRes_BinaryCanTrap to improve scalable vector support. (#239330)
The core change is to use ElementCount in place of unsigned, at which
point the original algorithm just works.
Special handling is required for `<vscale x 1 x Ty>`. When legal the
algorithm cannot assume a known-min-value of 1 implies scalarisation.
When not legal the algorithm cannot work and a failure is reported.
[CIR] Introduce `cir.vec.fcmp` op and floating comparison kinds (#235843)
Currently CIR uses the same operation and a set of comparison kinds for
both floating and integer comparisons which results in multiple
workarounds. For example: there are currently no unordered comparision
kinds and instead inversion is applied to ordered ones. This PR only
brings a new op and new comparison kinds that include unordered kinds
and true/false and uses it in one of the places (X86 builtins) where it
allows to remove a workaround. The intention is to do the whole split
between floating and integer comparisons at least for vector variant of
cir cmp op and this PR is the first step.
Assisted-by: claude
[libc++] Mark LWG4269 as Complete and test unique_copy argument order (#239085)
LWG4269 changes the specification of unique_copy so that the predicate
is called with the earlier element as the first argument, consistent
with unique.
libc++ already conforms to this in all three implementation strategies
of std::unique_copy and in ranges::unique_copy, so no library code
changes are needed. This is considered completed together with
ranges::unique{_copy} in 62f1e6638158d8848777a29d9d142bb5481c7b67 (LLVM
15, backported from 72f57e3a30d597346feec74cf626796b0055680f in LLVM
16).
This adds regression tests verifying that the earlier element is passed
first across iterator categories, ranges, and projections, and marks
LWG4269 as complete in Cxx26Issues.csv.
Fixes #171326
Signed-off-by: anant <anant1234466 at gmail.com>
[MLIR][Vector] Keep the kind and fast-math flags when rebuilding vector.contract (#236855)
Several patterns rebuild a `vector.contract` with the builder that takes
only the operands, the indexing maps and the iterator types. That
builder sets the default combining kind (`add`) and no fast-math flags.
So these patterns turn, for example, a `kind<maxnumf>` contract into a
`kind<add>` contract, which computes a different result, and they drop
the fast-math flags of the contract:
- `CombineContractABTranspose`, `CombineContractResultTranspose` and
`CombineContractBroadcastMask` (the reduction-to-contract patterns)
- `CanonicalizeContractMatmulToMMT`
- `FoldArithExtIntoContractionOp`
- `PrepareContractToGPUMMA` (VectorToGPU; `convert-vector-to-xegpu` uses
it too)
`castAwayContractionLeadingOneDim` keeps the kind, but drops the flags.
This patch gives the new contract the kind and the flags of the old one
[24 lines not shown]
[Flang][NFC] Remove unnecessary template instantiations (#239182)
Since #216960, the `Expr<>` specializations are not partial
specializations anymore, hence they do not need explicit instantiations
that tell the compiler which instances it needs to instantiate. Remove
the explicit instantiations that do nothing. Some other explicit
instantiations were unnecessary even before #216960.
Suggested by @eugeneepshteyn
(https://github.com/llvm/llvm-project/pull/238748#discussion_r4468788352)
[libc++][pstl] Add serial implementations of partitioning algorithms to PSTL (#234598)
This PR adds serial implementations of the partitioning algorithms to
PSTL.
They are added to the serial backend only, such that any other backend
can fall back to these implementations.
Currently there's no intent to provide parallel versions of these
algorithms, but later they can be added as well.
These are the added algorithms:
- `std::partition`
- `std::stable_partition`
- `std::partition_copy`
Included tests check that:
- Semantics of the functions is correct.
- The functions correctly SFINAE out when the first argument is not an
execution policy.
- The `nodiscard` policy is followed.
[3 lines not shown]
[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
[AArch64] Prevent outlining when PAuthLR attributes do not match (#238788)
Adds outliningCandidatesPAuthLRConsensus to ensure that both candidates
use the same method for return address signing when Feat_PAuth_LR is
enabled to be considered for outlining.
When outlining is allowed, also ensure that the branch-protection-pauth-lr
attribute is copied.
[Remarks] Make YAML remark arguments round-trip
The remark serializer writes an argument value with more than one
newline as a literal block scalar. A block scalar has no escapes, so a
value that also held a control character was written with the raw byte,
which strict YAML readers reject. Output::blockScalarString now falls
back to a double-quoted scalar when a literal block cannot hold the
value: a non-printable character (C1 controls, and NEL, LS and PS,
which YAML 1.1 readers take as line breaks), a carriage return, or a
first line that starts with a space. Input accepts either form.
The remark parser took the raw scalar text and stripped only single
quotes, so double-quoted values came back with their quotes and
escapes. Decode keys and values with ScalarNode::getValue and report
escape errors; the serializer quotes keys such as INST_@ too. Reject
strings that decode to a NUL, since the bitstream string table stores
NUL-terminated strings.
Output::blockScalarString always wrote "|", which keeps exactly one
[4 lines not shown]
[FixIrreducible] Do not redirect unreachable edges to non-entry blocks (#239557)
Attempting to redirect these edges broke the CFG and caused either
assertion failures or dominance verification failures.
This was previously fixed in 0b4cf802fad4 but the fix was lost in the
rewrite fa4cc9ddd58e.
Revert "[AMDGPU][NFC] precommit test for StructurizeCFG hoist and replace else phi arm for non-diamond case" (#239559)
Test requires AMDGPU. Tests fail when AMDGPU target is not built.
Reverts llvm/llvm-project#239475
[AArch64] Test SVE intrinsics in streaming modes
There was missing test-coverage for the intrinsics to verify that they
code-generate when the function is streaming or streaming-compatible.
This also adds some missing test coverage for:
* llvm.aarch64.sve.pmov.to.pred.lane.zero
* llvm.aarch64.sve.udot.lane.nxv2i64
In some cases the codegen is slightly different between
streaming/non-streaming code:
* Lack of 'movi' to zero-initialize a vector register in streaming mode.
* Non-streaming SVE generates unpredicated ORR instead of ADD.
* Subreg liveness enabled by default for streaming functions.
* Some missing movprfx patterns (so it always uses regular mov)
* Patterns for ld1rq* not firing.
I'll fix up the issue with the patterns separately.
[flang] Fold IAND/IOR/IEOR into the general reduction identifiers
The bitwise reduction operators IAND, IOR and IEOR were integer-specific
operations corresponding to logical AND, OR and NEQV.
Remove these integer-specific variants, and subsume their functionality
into AND, OR and EQV.
Co-Authored-By: Claude Opus 5 (1M context) <noreply at anthropic.com>
[Remarks] Make YAML remark arguments round-trip
The remark serializer writes an argument value with more than one
newline as a literal block scalar. A block scalar has no escapes, so a
value that also held a control character was written with the raw byte,
which strict YAML readers reject. Output::blockScalarString now falls
back to a double-quoted scalar when a literal block cannot hold the
value: a non-printable character (C1 controls, and NEL, LS and PS,
which YAML 1.1 readers take as line breaks), a carriage return, or a
first line that starts with a space. Input accepts either form.
The remark parser took the raw scalar text and stripped only single
quotes, so double-quoted values came back with their quotes and
escapes. Decode keys and values with ScalarNode::getValue and report
escape errors; the serializer quotes keys such as INST_@ too. Reject
strings that decode to a NUL, since the bitstream string table stores
NUL-terminated strings.
Output::blockScalarString always wrote "|", which keeps exactly one
[4 lines not shown]
[SLP][modularisation][NFC] Move BoUpSLP-independent helpers to SLP util modules (#237651)
Move file-local helpers that do not depend on BoUpSLP out of
SLPVectorizer.cpp into the self-contained SLPVectorizer/ modules:
- SLPCostAnalysis: buildIntrinsicArgTypes, getVectorCallCosts,
isPoorThroughputOp (with PoorThroughputOpCache, getVectorOpCost and
getPoorThroughputTypeKey), isFusableFMulOperand,
getVectorInstrContextHint, hasHighRegisterPressure.
- SLPCompatibilityAnalysis: getMainAltOpsNoStateVL, checkEVsForVecCalls.
- SLPShuffleAnalysis: performExtractsShuffleAction (with ValueSelect).
- SLPUtils: areTwoInsertFromSameBuildVector.
- SLPReductionUtils: the body of HorizontalReduction::getRdxKind, which
now forwards to it. This drops the file-static getRdxKind wrapper that
called back into HorizontalReduction.
Part of the SLPVectorizer.cpp modularization effort:
https://discourse.llvm.org/t/modularizing-slpvectorizer-cpp/90922
Assisted by AI