LLVM/project b74d59f — llvm/utils/gn/secondary/libcxx/include BUILD.gn, llvm/utils/gn/secondary/libcxx/src BUILD.gn

[gn] port fed3c60941ab (#239595)
DeltaFile
+0-4llvm/utils/gn/secondary/libcxx/include/BUILD.gn
+1-3llvm/utils/gn/secondary/libcxx/src/BUILD.gn
+1-72 files

LLVM/project ed282c8 — llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU BUILD.gn

[gn] port 0bd6ddc92cf4 (#239596)
DeltaFile
+1-0llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/BUILD.gn
+1-01 files

LLVM/project 58f0108 — llvm/lib/Target/SPIRV SPIRVEmitIntrinsics.cpp, llvm/test/CodeGen/SPIRV/pointers phi-select-retyped-null-operand.ll

[SPIR-V] Revalidate PHI and select operands after retyping them (#239343)
DeltaFile
+85-0llvm/test/CodeGen/SPIRV/pointers/phi-select-retyped-null-operand.ll
+21-0llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
+106-02 files

LLVM/project 2435d3d — offload/test lit.site.cfg.in lit.cfg, offload/test/ompt/omptest target_region.cpp

[Offload][OMPT] Use omptest for unit testing OMPT events (#239394)

We had developed omptest to be able to write tests that are very close to
writing gtest unit tests but being able to assert on OMPT events.

omptest has been in-tree for some time now but was not used to actually
test any OMPT events (afaik).

With this patch, we add omptest to the offload wiring for testing
libomptarget and introduce a new directory for omptest-based unit tests.
Having OMPT enabled and omptest being build in the default gtest-based
flavor to pick-up the in-tree gtest is the prerequisite for those unit
tests to be enabled.

The configuration of omptest is picked up from the buildtree and
omptests generated CMake config, and made available to the lit runner.
I am always a bit afraid of the CMake as I don't like it and easily get
confused with it.

AI-assisted: Claude Opus 5.5 / Sonnet 5
DeltaFile
+53-0offload/test/ompt/omptest/target_region.cpp
+18-3offload/test/CMakeLists.txt
+14-0offload/test/lit.cfg
+1-0offload/test/lit.site.cfg.in
+86-34 files

LLVM/project ad29e47 — clang/lib/AST/ByteCode Interp.cpp InterpBuiltin.cpp

[clang][bytecode][NFC] Remove `canBeInitialized()` checks (#239548)

Both `initialize()` and `active()` work without that precondition these
days.
DeltaFile
+19-43clang/lib/AST/ByteCode/Interp.h
+5-8clang/lib/AST/ByteCode/Pointer.h
+3-6clang/lib/AST/ByteCode/InterpBuiltin.cpp
+2-4clang/lib/AST/ByteCode/Interp.cpp
+29-614 files

LLVM/project 72f18f7 — lldb/docs/resources lldbdap-extensions.md, lldb/packages/Python/lldbsuite/test/tools/lldb_dap types.py

[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.
DeltaFile
+3-1lldb/packages/Python/lldbsuite/test/tools/lldb_dap/types.py
+1-1lldb/unittests/DAP/ProtocolTypesTest.cpp
+1-1lldb/tools/lldb-dap/Protocol/ProtocolTypes.cpp
+1-1lldb/test/API/tools/lldb-dap/utils/TestDAPUtils_Types.py
+1-1lldb/docs/resources/lldbdap-extensions.md
+7-55 files

LLVM/project d5a9c64 — llvm/lib/CodeGen/SelectionDAG LegalizeVectorTypes.cpp, llvm/test/CodeGen/AArch64 sve-vector-unroll.ll sve-widen-trapping-binops.ll

[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.
DeltaFile
+120-0llvm/test/CodeGen/AArch64/sve-widen-trapping-binops.ll
+90-0llvm/test/CodeGen/AArch64/sve-vector-unroll.ll
+41-27llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+251-273 files

LLVM/project acb21d5 — clang/include/clang/CIR/Dialect/Builder CIRBaseBuilder.h, clang/include/clang/CIR/Dialect/IR CIROps.td

[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
DeltaFile
+127-6clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+73-0clang/include/clang/CIR/Dialect/IR/CIROps.td
+70-0clang/test/CIR/CodeGenBuiltins/builtin-fcmp-sse-strict.c
+20-45clang/lib/CIR/CodeGen/CIRGenBuiltinX86.cpp
+16-24clang/test/CIR/CodeGenBuiltins/builtin-fcmp-sse.c
+35-0clang/include/clang/CIR/Dialect/Builder/CIRBaseBuilder.h
+341-752 files not shown
+361-848 files

LLVM/project d5e6df6 — libcxx/docs/Status Cxx26Issues.csv, libcxx/test/std/algorithms/alg.modifying.operations/alg.unique unique_copy_pred.pass.cpp ranges_unique_copy.pass.cpp

[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>
DeltaFile
+32-5libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/ranges_unique_copy.pass.cpp
+18-0libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/unique_copy_pred.pass.cpp
+1-1libcxx/docs/Status/Cxx26Issues.csv
+51-63 files

LLVM/project 60b2d8a — llvm/lib/Target/AMDGPU AMDGPUIGroupLP.cpp, llvm/test/CodeGen/AMDGPU iglp-cache-creation.mir llvm.amdgcn.iglp.opt.ll

implement feedback
DeltaFile
+0-1,605llvm/test/CodeGen/AMDGPU/llvm.amdgcn.iglp.opt.single.multi-func.ll
+41-33llvm/lib/Target/AMDGPU/AMDGPUIGroupLP.cpp
+2-6llvm/test/CodeGen/AMDGPU/llvm.amdgcn.iglp.opt.ll
+2-2llvm/test/CodeGen/AMDGPU/iglp-cache-creation.mir
+45-1,6464 files

LLVM/project aab5db6 — mlir/lib/Dialect/Vector/Transforms VectorTransforms.cpp, mlir/test/Conversion/VectorToXeGPU contract-to-xegpu.mlir

[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]
DeltaFile
+25-0mlir/test/Conversion/VectorToXeGPU/contract-to-xegpu.mlir
+10-8mlir/test/Dialect/Vector/vector-reduce-to-contract.mlir
+8-7mlir/test/Dialect/Vector/vector-contract-matmul-transforms.mlir
+9-5mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp
+5-3mlir/test/Dialect/Vector/vector-dropleadunitdim-transforms.mlir
+3-3mlir/test/Dialect/Vector/fold-arith-extf-into-vector-contract.mlir
+60-262 files not shown
+63-288 files

LLVM/project 2dd747f — llvm/lib/Target/AMDGPU GCNRematStrategy.cpp

[AMDGPU][CodeGen] Fix `EXPENSIVE_CHECKS` in `GCNRematStrategy` (#239572)

Issue introduced in #238850.
DeltaFile
+1-1llvm/lib/Target/AMDGPU/GCNRematStrategy.cpp
+1-11 files

LLVM/project 7b7fc18 — flang/include/flang/Evaluate expression.h

[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)
DeltaFile
+0-12flang/include/flang/Evaluate/expression.h
+0-121 files

LLVM/project 4b3e5c7 — llvm/lib/Target/AArch64 AArch64SVEInstrInfo.td, llvm/test/CodeGen/AArch64 sve-intrinsics-fp-arith-imm.ll

[AArch64] Fix missing SME target guard for zeroing pseudos.

This allows the use of zeroing movprfx in streaming functions.
DeltaFile
+243-576llvm/test/CodeGen/AArch64/sve-intrinsics-fp-arith-imm.ll
+1-1llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
+244-5772 files

LLVM/project c274a51 — libcxx/include/__algorithm pstl.h, libcxx/include/__pstl backend_fwd.h

[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]
DeltaFile
+226-0libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/pstl.partition_copy.pass.cpp
+180-0libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/pstl.stable_partition.pass.cpp
+127-0libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/pstl.partition.pass.cpp
+58-0libcxx/include/__algorithm/pstl.h
+40-0libcxx/include/__pstl/backends/serial.h
+22-0libcxx/include/__pstl/backend_fwd.h
+653-03 files not shown
+690-09 files

LLVM/project 3ade2bc — llvm/lib/Target/LoongArch LoongArchRegisterInfo.cpp, llvm/test/CodeGen/LoongArch/lasx xvldrepl-frame-index.ll

[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
DeltaFile
+12-0llvm/lib/Target/LoongArch/LoongArchRegisterInfo.cpp
+6-3llvm/test/CodeGen/LoongArch/lsx/vldrepl-frame-index.ll
+6-3llvm/test/CodeGen/LoongArch/lasx/xvldrepl-frame-index.ll
+24-63 files

LLVM/project edcf626 — llvm/test/CodeGen/LoongArch/lasx xvldrepl-frame-index.ll, llvm/test/CodeGen/LoongArch/lsx vldrepl-frame-index.ll

[LoongArch] Pre-commit tests for misaligned frame-index offset on vldrepl (#239515)

Assisted-by: LLM
DeltaFile
+76-0llvm/test/CodeGen/LoongArch/lsx/vldrepl-frame-index.ll
+76-0llvm/test/CodeGen/LoongArch/lasx/xvldrepl-frame-index.ll
+152-02 files

LLVM/project e17b428 — llvm/lib/Target/AArch64 AArch64InstrInfo.cpp, llvm/test/CodeGen/AArch64 machine-outliner-retaddr-sign-subtarget.ll machine-outliner-retaddr-sign-branch-protection-lr.ll

[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.
DeltaFile
+361-0llvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-sp-pc-mod.mir
+88-0llvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-pauth-lr.ll
+86-0llvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-branch-protection-lr.ll
+33-0llvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-subtarget.ll
+28-4llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+596-45 files

LLVM/project cf86e0d — llvm/lib/Remarks YAMLRemarkParser.cpp, llvm/lib/Support YAMLTraits.cpp

[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]
DeltaFile
+67-0llvm/unittests/Remarks/YAMLRemarksSerializerTest.cpp
+49-7llvm/unittests/Support/YAMLIOTest.cpp
+53-0llvm/unittests/Remarks/YAMLRemarksParsingTest.cpp
+46-0llvm/lib/Support/YAMLTraits.cpp
+21-17llvm/lib/Remarks/YAMLRemarkParser.cpp
+18-0llvm/test/tools/llvm-remarkutil/yaml2bitstream-control.test
+254-242 files not shown
+270-268 files

LLVM/project 49d88d6 — utils/bazel/llvm-project-overlay/lldb/test/Shell/ObjectFile BUILD.bazel

Fix bazel build for #239425 (#239571)

Fix bazel build for #239425.
DeltaFile
+1-0utils/bazel/llvm-project-overlay/lldb/test/Shell/ObjectFile/BUILD.bazel
+1-01 files

LLVM/project 3cf8423 — llvm/lib/Transforms/Utils ControlFlowUtils.cpp, llvm/test/Transforms/FixIrreducible shared-inverted-condition.ll

[ControlFlowUtils] Fix nullptr dereference in ControlFlowHub::finalize (#239542)
DeltaFile
+41-0llvm/test/Transforms/FixIrreducible/shared-inverted-condition.ll
+4-3llvm/lib/Transforms/Utils/ControlFlowUtils.cpp
+45-32 files

LLVM/project 8280e32 — llvm/lib/Transforms/Utils FixIrreducible.cpp, llvm/test/Transforms/FixIrreducible unreachable-predecessor.ll

[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.
DeltaFile
+157-0llvm/test/Transforms/FixIrreducible/unreachable-predecessor.ll
+9-5llvm/lib/Transforms/Utils/FixIrreducible.cpp
+166-52 files

LLVM/project 7551d96 — llvm/test/Transforms/StructurizeCFG hoist-zerocost-multiple-rejections.ll

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
DeltaFile
+0-1,664llvm/test/Transforms/StructurizeCFG/hoist-zerocost-multiple-rejections.ll
+0-1,6641 files

LLVM/project a94e71a — llvm/test/CodeGen/AMDGPU stacksave_stackrestore.ll

Enable the IR test
DeltaFile
+1,072-0llvm/test/CodeGen/AMDGPU/stacksave_stackrestore.ll
+1,072-01 files

LLVM/project a922f35 — llvm/test/CodeGen/AArch64 sve-intrinsics-loads.ll sve-intrinsics-shifts-merging.ll

[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.
DeltaFile
+579-241llvm/test/CodeGen/AArch64/sve-intrinsics-fp-arith-imm.ll
+386-48llvm/test/CodeGen/AArch64/sve-intrinsics-perm-select.ll
+111-80llvm/test/CodeGen/AArch64/sve2-bitwise-ternary.ll
+111-72llvm/test/CodeGen/AArch64/sve-int-arith-pred.ll
+120-55llvm/test/CodeGen/AArch64/sve-intrinsics-shifts-merging.ll
+97-43llvm/test/CodeGen/AArch64/sve-intrinsics-loads.ll
+1,404-53961 files not shown
+2,222-91267 files

LLVM/project ecea8f5 — flang/include/flang/Lower/Support ReductionProcessor.h, flang/lib/Lower/Support ReductionProcessor.cpp

[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>
DeltaFile
+44-59flang/lib/Lower/Support/ReductionProcessor.cpp
+10-8flang/include/flang/Lower/Support/ReductionProcessor.h
+3-3flang/test/Lower/loops3.f90
+57-703 files

LLVM/project a25a4df — llvm/lib/Remarks YAMLRemarkParser.cpp, llvm/lib/Support YAMLTraits.cpp

[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]
DeltaFile
+67-0llvm/unittests/Remarks/YAMLRemarksSerializerTest.cpp
+49-7llvm/unittests/Support/YAMLIOTest.cpp
+53-0llvm/unittests/Remarks/YAMLRemarksParsingTest.cpp
+44-0llvm/lib/Support/YAMLTraits.cpp
+21-17llvm/lib/Remarks/YAMLRemarkParser.cpp
+18-0llvm/test/tools/llvm-remarkutil/yaml2bitstream-control.test
+252-242 files not shown
+268-268 files

LLVM/project 77acb09 — llvm/test/CodeGen/AMDGPU/GlobalISel regbankselect-stackrestore.mir

pre-commit failing test cases
DeltaFile
+41-0llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-stackrestore.mir
+41-01 files

LLVM/project c4c9013 — llvm/lib/Target/AMDGPU AMDGPURegBankLegalizeRules.cpp, llvm/test/CodeGen/AMDGPU/GlobalISel regbankselect-stackrestore.mir

[AMDGPU][GISel] Add RegBankLegalize rule for G_STACKRESTORE
DeltaFile
+21-4llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-stackrestore.mir
+2-0llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp
+23-42 files

LLVM/project c185699 — llvm/test/CodeGen/AMDGPU fmax3-maximumnum.ll fmin3-minimumnum.ll

[AMDGPU][NFC] Enable GlobalISel in fmax3-maximumnum and fmin3-minimumnum (#239485)
DeltaFile
+4,386-1,684llvm/test/CodeGen/AMDGPU/fmin3-minimumnum.ll
+4,384-1,682llvm/test/CodeGen/AMDGPU/fmax3-maximumnum.ll
+8,770-3,3662 files