LLVM/project c2ea444 — mlir/test/Conversion/MathToVCIX math-to-vcix.mlir, mlir/test/lib/Conversion/MathToVCIX TestMathToVCIXConversion.cpp

[mlir][VCIX] Check legalized type before use in math.tan test pattern (#236051)

`MathTanToVCIX` called `getElementType()` on the result of
`legalizeVectorType()` before checking whether legalization failed. For
types it can't legalize (scalars, multi-dimensional vectors, scalable
vectors with unsupported element types) that result is null, so the
pattern crashed instead of leaving the op alone like the cos, sin and
log patterns do.

This moves the null check above the first use and adds tests for a
scalar `math.tan` and a `vector<2x4xf32>` one.

Fixes #231844
DeltaFile
+20-0mlir/test/Conversion/MathToVCIX/math-to-vcix.mlir
+1-1mlir/test/lib/Conversion/MathToVCIX/TestMathToVCIXConversion.cpp
+21-12 files

LLVM/project 71ce178 — flang/lib/Optimizer/OpenACC/Support FIROpenACCTypeInterfaces.cpp, mlir/include/mlir/Dialect/OpenACC OpenACCUtils.h OpenACCTypeInterfaces.td

[mlir][acc] Cache symbol lookups in ACCImplicitData (#236237)

ACCImplicitData resolves the global behind every candidate variable with
SymbolTable::lookupNearestSymbolFrom, through isDeviceAccessibleValue,
isInDeviceMemoryValue and the FIR type-interface models. Without a table
each lookup scans every top-level op of the module, so on a module with
thousands of symbols this dominates the pass.

Let callers pass an optional SymbolTableCollection to
isDeviceAccessibleValue, isInDeviceMemoryValue, isValidValueUse and
OpenACCSupport::isValidValueUse, and add it as a trailing parameter of
the
PointerLikeType and MappableType isDeviceAccessible / isInDeviceMemory
interface methods. ACCImplicitData keeps one collection for the duration
of a run. Passing no collection keeps the previous behavior.

This can speedup the pass by 4.5x on a large TU with a lots of symbols.
DeltaFile
+64-50flang/lib/Optimizer/OpenACC/Support/FIROpenACCTypeInterfaces.cpp
+29-14mlir/lib/Dialect/OpenACC/Utils/OpenACCUtils.cpp
+16-8mlir/include/mlir/Dialect/OpenACC/OpenACCTypeInterfaces.td
+19-4mlir/include/mlir/Dialect/OpenACC/Analysis/OpenACCSupport.h
+17-5mlir/lib/Dialect/OpenACC/Transforms/ACCImplicitData.cpp
+13-3mlir/include/mlir/Dialect/OpenACC/OpenACCUtils.h
+158-849 files not shown
+191-10115 files

LLVM/project 863a82f — llvm/include/llvm/Support SourceMgrDiagnosticVerifier.h, llvm/lib/Support SourceMgrDiagnosticVerifier.cpp

[Support][mlir] Allow custom prefixes in SourceMgrDiagnosticVerifier (#227568)

Allow callers to choose the directive prefixes (default: `expected`),
like Clang's `-verify=<prefixes>`, so that one test file can be shared
between RUN lines with different expectations.

A prefix now has to be at the start of the line or follow a character
other than `[[:alnum:]_-]`, so that `expected-error` is no longer found
inside e.g. `unexpected-error`. This also applies to MLIR.

Assisted-by: AI tooling
Pull-Request: https://github.com/llvm/llvm-project/pull/227568
DeltaFile
+30-12llvm/lib/Support/SourceMgrDiagnosticVerifier.cpp
+6-4llvm/include/llvm/Support/SourceMgrDiagnosticVerifier.h
+6-0mlir/test/IR/diagnostic-handler-verify-prefix.mlir
+3-1mlir/docs/Diagnostics.md
+45-174 files

LLVM/project aeddfac — llvm/lib/Target/RISCV RISCVInstrInfoP.td, llvm/test/CodeGen/RISCV rvp-scalar.ll

[RISCV][P-ext] Add isel pattern for mulsu.h11/maccsu.h11 (#236118)

`mulsu.h11` multiplies the sign-extended upper half word of rs1 by the
zero-extended upper half word of rs2. `maccsu.h11` adds the product to
rd.

Previously, (sra X, 16) and (srl X, 16) were selected as separate
srai/srli instructions feeding `mul` or `maccsu.h00`. Match them
directly
so both shifts are folded. As with `maccsu.h00`, the maccsu pattern
requires the multiply to have a single use.
DeltaFile
+107-0llvm/test/CodeGen/RISCV/rvp-scalar.ll
+6-0llvm/lib/Target/RISCV/RISCVInstrInfoP.td
+113-02 files

LLVM/project 26263f9 — llvm/unittests/Support CMakeLists.txt SourceMgrDiagnosticVerifierTest.cpp, llvm/utils/gn/secondary/llvm/unittests/Support BUILD.gn

[nspr] initial commit
DeltaFile
+108-0llvm/unittests/Support/SourceMgrDiagnosticVerifierTest.cpp
+13-0mlir/test/mlir-opt/verify-diagnostics-highlight.mlir
+1-0llvm/utils/gn/secondary/llvm/unittests/Support/BUILD.gn
+1-0llvm/unittests/Support/CMakeLists.txt
+123-04 files

LLVM/project 8bffd95 — llvm/lib/Support SourceMgrDiagnosticVerifier.cpp, mlir/test/mlir-opt expected-unknown-loc-unmatched.mlir

[nspr] initial commit
DeltaFile
+4-2mlir/test/mlir-opt/expected-unknown-loc-unmatched.mlir
+1-0llvm/lib/Support/SourceMgrDiagnosticVerifier.cpp
+5-22 files

LLVM/project 6ad977f — flang/lib/Semantics check-declarations.cpp, flang/test/Semantics elemental04.f90

[flang] Evaluate InElemental() at most once per scope (#236235)

`CheckHelper::InElemental()` called `IsElementalProcedure()` on every
use. That characterizes the whole enclosing procedure, including every
dummy argument and the folding of its shape. `CheckObjectEntity()` calls
`InElemental()` for each object entity, so declaration checking was
quadratic in the number of dummy arguments: issue 236223 has the
reproducer and the profile.

This caches the result for the innermost procedure symbol and resets it
whenever `CheckHelper::Check(const Scope &)` changes that symbol.
Diagnostics are unchanged: `IsElementalProcedure()` is still the only
source of the answer, just evaluated once per scope instead of once per
entity.

With the issue's generator, `-fsyntax-only` is now linear in the number
of dummies: at 800 explicit-shape dummies it goes from 24.8 G to 0.44 G
instructions (about 56x). `check-flang` passes.


    [2 lines not shown]
DeltaFile
+25-0flang/test/Semantics/elemental04.f90
+14-1flang/lib/Semantics/check-declarations.cpp
+39-12 files

LLVM/project 0de3f4c — llvm/tools/llvm-mc Disassembler.cpp llvm-mc.cpp

[nspr] initial commit
DeltaFile
+13-11llvm/tools/llvm-mc/llvm-mc.cpp
+2-1llvm/tools/llvm-mc/Disassembler.cpp
+15-122 files

LLVM/project 414a601 — llvm/lib/Target/AArch64 AArch64StackTagging.cpp, llvm/lib/Transforms/Utils MemoryTaggingSupport.cpp

[AArch64][MTE] Tag dynamic allocas in AArch64StackTagging

Instrument dynamic allocas in the memtag-stack pass, more or less
following the the way AddressSanitizer does: by instrumenting
stackrestore to un(poison/tag) allocas when free'd.

- Dynamic allocas are given 16-byte alignment and padded to 16-bytes.
- At lifetime.start (or at the alloca if no lifetimes), the dynamic
alloca is tagged.
- The most recently executed dynamic alloca is tracked in an extra
per-func static alloca. The address of this static alloca is used
as the bottom (highest address) of the dynamic alloca section of
the frame, while the value stored there is treated as the current
top (lowest address) of the frame.
- At llvm.stackrestores, memory is untagged from the restored sp
to the last executed dynamic alloca.
- At function returns, memory is untagged from the last executed
dynamic alloca to the bottom of the (dynamic alloca section of) the
frame.

    [2 lines not shown]
DeltaFile
+779-0llvm/test/CodeGen/AArch64/stack-tagging-dynamic-alloca.ll
+168-8llvm/lib/Target/AArch64/AArch64StackTagging.cpp
+100-0llvm/test/CodeGen/AArch64/stack-tagging-dynamic-alloca-history.ll
+17-7llvm/lib/Transforms/Utils/MemoryTaggingSupport.cpp
+18-0llvm/test/CodeGen/AArch64/stack-tagging-dbg-declare-tag-offset.ll
+7-5llvm/test/CodeGen/AArch64/stack-tagging.ll
+1,089-202 files not shown
+1,097-228 files

LLVM/project d83d4db — llvm/lib/Target/RISCV RISCVInstrInfoXqci.td RISCVInstrInfoY.td, llvm/test/MC/RISCV/rvy rvyc-valid-addi.s

[nspr] initial commit
DeltaFile
+82-0llvm/test/MC/RISCV/rvy/rvyc-valid-addi.s
+8-8llvm/lib/Target/RISCV/RISCVInstrInfoC.td
+7-0llvm/lib/Target/RISCV/RISCVInstrInfoY.td
+2-0llvm/lib/Target/RISCV/RISCVInstrInfoXqci.td
+99-84 files

LLVM/project bf2403d — clang/lib/Sema SemaType.cpp, clang/test/CodeGenHLSL/builtins BoolSwizzles.hlsl

Merge branch 'main' into users/rampitec/constant-fold-sqrt
DeltaFile
+105-76libcxx/utils/ci/lnt/detect-changepoints
+49-0clang/test/SemaHLSL/Semantics/startinstancelocation.vs.hlsl
+38-8clang/test/SemaOpenCL/invalid-pipes-cl2.0.cl
+15-30clang/test/CodeGenHLSL/builtins/BoolSwizzles.hlsl
+41-0llvm/test/CodeGen/SPIRV/semantics/start-instance-location.vs.ll
+27-2clang/lib/Sema/SemaType.cpp
+275-11632 files not shown
+567-15038 files

LLVM/project 130c3b4 — llvm/test/Transforms/SandboxVectorizer/Passes/LoadStoreVec propagate_metadata.ll

[SandboxVec] Precommit test (NFC) (#236208)

This is for a follow-up patch that fixes the propagation of metadata.
DeltaFile
+28-0llvm/test/Transforms/SandboxVectorizer/Passes/LoadStoreVec/propagate_metadata.ll
+28-01 files

LLVM/project f872489 — llvm/lib/Target/AArch64 AArch64StackTagging.cpp, llvm/lib/Transforms/Utils MemoryTaggingSupport.cpp

[AArch64][MTE] Tag dynamic allocas in AArch64StackTagging

Instrument dynamic allocas in the memtag-stack pass, more or less
following the the way AddressSanitizer does: by instrumenting
stackrestore to un(poison/tag) allocas when free'd.

- Dynamic allocas are given 16-byte alignment and padded to 16-bytes.
- At lifetime.start (or at the alloca if no lifetimes), the dynamic
alloca is tagged.
- The most recently executed dynamic alloca is tracked in an extra
per-func static alloca. The address of this static alloca is used
as the bottom (highest address) of the dynamic alloca section of
the frame, while the value stored there is treated as the current
top (lowest address) of the frame.
- At llvm.stackrestores, memory is untagged from the restored sp
to the last executed dynamic alloca.
- At function returns, memory is untagged from the last executed
dynamic alloca to the bottom of the (dynamic alloca section of) the
frame.

    [2 lines not shown]
DeltaFile
+779-0llvm/test/CodeGen/AArch64/stack-tagging-dynamic-alloca.ll
+170-8llvm/lib/Target/AArch64/AArch64StackTagging.cpp
+100-0llvm/test/CodeGen/AArch64/stack-tagging-dynamic-alloca-history.ll
+17-7llvm/lib/Transforms/Utils/MemoryTaggingSupport.cpp
+18-0llvm/test/CodeGen/AArch64/stack-tagging-dbg-declare-tag-offset.ll
+7-5llvm/test/CodeGen/AArch64/stack-tagging.ll
+1,091-202 files not shown
+1,099-228 files

LLVM/project 96b43d4 — llvm/lib/Target/AMDGPU GCNSubtarget.cpp

Do not assert IssueCycles > 0

Change-Id: I60e89a537117ab49d5bf8aafe12f7fdcc2d7e383
DeltaFile
+1-2llvm/lib/Target/AMDGPU/GCNSubtarget.cpp
+1-21 files

LLVM/project fe4aa38 — llvm/lib/Target/RISCV RISCVRegisterInfo.td, llvm/test/MC/RISCV/rvy rvyc-valid-load-store-64.s rvy-invalid-load-store.s

[nspr] initial commit
DeltaFile
+465-0llvm/test/MC/RISCV/rvy/rvyc-valid-load-store.s
+178-0llvm/test/MC/RISCV/rvy/rvyc-invalid-load-store.s
+175-0llvm/test/MC/RISCV/rvy/rvy-valid-load-store.s
+101-0llvm/test/MC/RISCV/rvy/rvy-invalid-load-store.s
+65-33llvm/lib/Target/RISCV/RISCVRegisterInfo.td
+86-0llvm/test/MC/RISCV/rvy/rvyc-valid-load-store-64.s
+1,070-3313 files not shown
+1,305-5519 files

LLVM/project 595e569 — libcxx/utils/ci/lnt detect-changepoints

[libc++] Make detect-changepoints much faster (#236245)

The permutation test used to find changepoints was the bottleneck of the
LNT refinement job. This patch makes the test much cheaper in two ways
without changing the algorithm:
- Compute the best split of a segment only once, when the segment is
  created.
- Scoring every split of a segment only needs the sums of distances
  within the first t points and between the first t points and the whole
  segment. The latter doesn't depend on the order of the points, so it is
  computed once per segment.

This was measured to be roughly 10x faster as the previous algorithm,
and gives the same results.

Assisted by Claude
DeltaFile
+105-76libcxx/utils/ci/lnt/detect-changepoints
+105-761 files

LLVM/project a24ecba — clang/test/Analysis lifetime-end-path-notes.cpp

Apply nits to the test file.
DeltaFile
+4-4clang/test/Analysis/lifetime-end-path-notes.cpp
+4-41 files

LLVM/project a40aab6 — .github CODEOWNERS

[libc][CODEOWNERS] Route math reviews to lntue (#236204)

Math, FPUtil, and complex entrypoints require specialised domain
expertise and clutter the review dashboard for the rest of the libc
team.

Route these directories to lntue rather than reviewers-libc.

Assisted-by: Automated tooling, human reviewed.
DeltaFile
+3-0.github/CODEOWNERS
+3-01 files

LLVM/project 004be2f — llvm/utils/gn/secondary/clang/lib/StaticAnalyzer/Checkers BUILD.gn

Update Build.gn.
DeltaFile
+1-1llvm/utils/gn/secondary/clang/lib/StaticAnalyzer/Checkers/BUILD.gn
+1-11 files

LLVM/project 94ebf40 — llvm/lib/Transforms/Vectorize/SandboxVectorizer SeedCollector.cpp, llvm/unittests/Transforms/Vectorize/SandboxVectorizer SeedCollectorTest.cpp

[SandboxVec][SeedCollector] Fix insertion into seed container (#235853)

This patch fixes the insertion into the seed container when we have a
mem access with the same key as the existing seed bundle, but insertion
into it fails because the pointer access is not a constant distance.
DeltaFile
+22-2llvm/unittests/Transforms/Vectorize/SandboxVectorizer/SeedCollectorTest.cpp
+7-3llvm/lib/Transforms/Vectorize/SandboxVectorizer/SeedCollector.cpp
+29-52 files

LLVM/project 7b11125 — utils/bazel/llvm-project-overlay/lldb BUILD.bazel

[Bazel] Fixes 6c21fa1 (#236215)

This fixes 6c21fa19aa4b31b8e49e349ede92b48bbf742afd (#235230).

Buildkite error link:
https://buildkite.com/llvm-project/upstream-bazel/builds?commit=6c21fa19aa4b31b8e49e349ede92b48bbf742afd

Co-authored-by: Google Bazel Bot <google-bazel-bot at google.com>
DeltaFile
+1-0utils/bazel/llvm-project-overlay/lldb/BUILD.bazel
+1-01 files

LLVM/project 163be77 — clang/include/clang/Basic DiagnosticSemaKinds.td, clang/lib/Parse ParseDecl.cpp

[OpenCL] Diagnose invalid pipe packet types when formed (#234347)

Validation is limited to function parameters and misses invalid pipe
typedefs such as `typedef pipe void P;`. Move this validation into
`BuildReadPipeType` and `BuildWritePipeType` so declarations and
template instantiations follow the same packet-type restrictions.

Reject pointer, reference, block pointer, non-object, and non-dependent
incomplete packet types. Defer checks that require a concrete type until
template substitution, but diagnose dependent function types
immediately. Report errors at the `pipe` keyword.

Assisted-by: Codex / GPT-5.6 Sol + GPT-6 Astra
DeltaFile
+38-8clang/test/SemaOpenCL/invalid-pipes-cl2.0.cl
+27-2clang/lib/Sema/SemaType.cpp
+0-11clang/lib/Sema/SemaDecl.cpp
+3-3clang/lib/Parse/ParseDecl.cpp
+4-2clang/include/clang/Basic/DiagnosticSemaKinds.td
+1-0clang/lib/Sema/DeclSpec.cpp
+73-266 files

LLVM/project 6c141a9 — clang/lib/CIR/CodeGen CIRGenFunction.h CIRGenStmtOpenMP.cpp, clang/test/CIR/CodeGenOpenMP target-parallel-for.c

[CIR][OpenMP] Add support for host_eval so that SPMD kernels can be used

This patch adds support for host_eval so that SPMD kernels and in the future
num_threads and other clauses can be implemented correctly.

Assisted-by: Cursor / Claude Sonnet 5 High
DeltaFile
+150-14clang/lib/CIR/CodeGen/CIRGenStmtOpenMP.cpp
+40-29clang/test/CIR/CodeGenOpenMP/target-parallel-for.c
+26-0clang/lib/CIR/CodeGen/CIRGenFunction.h
+216-433 files

LLVM/project 385160a — clang/lib/CIR/CodeGen CIRGenStmtOpenMP.cpp, clang/test/CIR/CodeGenOpenMP target-parallel.c region-cleanups-O2.c

[CIR][OpenMP] Add support for the OpenMP 'for' directive

This patch adds support for wsloop in ClangIR: the `for` directive and its
combined forms `parallel for` and `target parallel for`. This is lowered to an
omp.wsloop + omp.loop_nest, nested utilizing the existing queue-based
decomposition.

Assisted-by: Cursor / Claude Sonnet 5 High
DeltaFile
+327-68clang/lib/CIR/CodeGen/CIRGenStmtOpenMP.cpp
+343-0clang/test/CIR/CodeGenOpenMP/target-parallel-for.c
+228-0clang/test/CIR/CodeGenOpenMP/for-loop-forms.c
+220-0clang/test/CIR/CodeGenOpenMP/for.c
+140-0clang/test/CIR/CodeGenOpenMP/region-cleanups-O2.c
+133-0clang/test/CIR/CodeGenOpenMP/target-parallel.c
+1,391-684 files not shown
+1,536-7010 files

LLVM/project 8f8e624 — clang/lib/CIR/CodeGen CIRGenStmtOpenMP.cpp, clang/test/CIR/CodeGenOpenMP not-yet-implemented.c region-cleanups-O2.c

[CIR][OpenMP] Add support for 'distribute parallel for' with 'target teams'

Adds support for handling the full '[target] teams distribute parallel for'.
Introduces setting the omp.composite attibute for the 'distribute parallel for'
composite construct.

Assisted-by: Cursor / Claude Sonnet 5 High
DeltaFile
+556-0clang/test/CIR/CodeGenOpenMP/target-teams-distribute-parallel-for.c
+296-38clang/lib/CIR/CodeGen/CIRGenStmtOpenMP.cpp
+213-0clang/test/CIR/CodeGenOpenMP/distribute-parallel-for.c
+27-0clang/test/CIR/CodeGenOpenMP/region-cleanups-O2.c
+13-0clang/test/CIR/CodeGenOpenMP/not-yet-implemented.c
+1,105-385 files

LLVM/project eff1433 — clang/lib/CIR/CodeGen CIRGenStmtOpenMP.cpp, clang/test/CIR/CodeGenOpenMP not-yet-implemented.c region-cleanups-O2.c

[CIR][OpenMP] Add support for omp teams

This patch adds support for the OpenMP 'teams' directive, both standalone
and as the combined `target teams` construct. isCombinableLeaf now also
recognizes teams, so an explicitly-nested `target` + `teams` pair gets
the same omp.combined marking as the combined case.

Assisted-by: Cursor / Claude Sonnet 5 High
DeltaFile
+176-0clang/test/CIR/CodeGenOpenMP/target-teams.c
+108-0clang/test/CIR/CodeGenOpenMP/teams.c
+101-5clang/lib/CIR/CodeGen/CIRGenStmtOpenMP.cpp
+24-0clang/test/CIR/CodeGenOpenMP/region-cleanups-O2.c
+13-3clang/test/CIR/CodeGenOpenMP/not-yet-implemented.c
+422-85 files

LLVM/project 81fe814 — clang/lib/CIR/CodeGen CIRGenStmtOpenMP.cpp, clang/test/CIR/CodeGenOpenMP not-yet-implemented.c teams-distribute.c

[CIR][OpenMP] Add initial support for distribute

This patch adds initial support for the OpenMP 'distribute' directive. Basic
code generation for the standalone and combined cases is introduced. Support
for clauses will be added in the future. The composite 'teams distribute
parallel for' form will be added in a subsequent patch.

Assisted-by: Cursor / Claude Sonnet 5 High
DeltaFile
+405-0clang/test/CIR/CodeGenOpenMP/target-teams-distribute.c
+146-29clang/lib/CIR/CodeGen/CIRGenStmtOpenMP.cpp
+154-0clang/test/CIR/CodeGenOpenMP/teams-distribute.c
+12-0clang/test/CIR/CodeGenOpenMP/not-yet-implemented.c
+717-294 files

LLVM/project cca3ed5 — llvm/lib/Target/AVR AVRISelDAGToDAG.cpp AVR.h, llvm/test/CodeGen/AVR newpm-pipeline.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+93-0llvm/lib/Target/AVR/AVRCodeGenPassBuilder.cpp
+90-0llvm/test/CodeGen/AVR/newpm-pipeline.ll
+49-38llvm/lib/Target/AVR/AVRShiftExpand.cpp
+33-0llvm/lib/Target/AVR/AVRPassRegistry.def
+19-3llvm/lib/Target/AVR/AVR.h
+7-2llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp
+291-433 files not shown
+303-469 files

LLVM/project ef387f1 — llvm/lib/Target/AVR AVRTargetMachine.h AVRISelDAGToDAG.cpp, llvm/test/CodeGen/AVR newpm-pipeline.ll

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.7

[skip ci]
DeltaFile
+93-0llvm/lib/Target/AVR/AVRCodeGenPassBuilder.cpp
+89-0llvm/test/CodeGen/AVR/newpm-pipeline.ll
+28-0llvm/lib/Target/AVR/AVRPassRegistry.def
+10-1llvm/lib/Target/AVR/AVR.h
+7-2llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp
+8-0llvm/lib/Target/AVR/AVRTargetMachine.h
+235-32 files not shown
+237-48 files

LLVM/project 1aaad60 — clang/test/Analysis lifetime-end-order.cpp

Add a simple test case.
DeltaFile
+12-0clang/test/Analysis/lifetime-end-order.cpp
+12-01 files