LLVM/project a20b2dbmlir/lib/Dialect/LLVMIR/IR LLVMTypes.cpp, mlir/test/Dialect/LLVMIR types-invalid.mlir

[mlir][LLVM] Disallow opaque struct types as function arguments

Function types are only allowed to take first-class values as arguments.
The LLVM dialect implemented this correctly so far except for allowing opaque struct types.
When translated to LLVM proper, invalid IR would be created with confusing assertion errors.

This PR matches LLVM by disallowing opaque struct types as arguments, allowing users to catch this kind of mistake early while still in the MLIR world.

The corresponding LLVM logic is here: https://github.com/llvm/llvm-project/blob/c4898f3f229027e6cbdf8f9db77b8c14d70f6599/llvm/lib/IR/Type.cpp#L404
DeltaFile
+7-0mlir/test/Dialect/LLVMIR/types-invalid.mlir
+3-0mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp
+10-02 files

LLVM/project 30434ballvm/test/tools/llubi loadstore_le.ll loadstore_be.ll, llvm/tools/llubi/lib Context.cpp Interpreter.cpp

[Reland][llubi] Add support for load/store/lifetime markers (#185196)

This patch relands https://github.com/llvm/llvm-project/pull/182532. The
original version causes test failures related undef bits since it
incorrectly assumes `std::uniform_int_distribution` yields the same
results across different stdlib vendors. This patch simply uses low bits
to avoid the issue. I am not sure whether it still generates uniformly
distributed random numbers. But abseil also uses this trick:
https://github.com/abseil/abseil-cpp/blob/e72b94a2f257ba069ec0b99e557e9f1f6b9c1a3e/absl/random/uniform_int_distribution.h#L203-L206

I have confirmed all tests passed with libstdc++ and libc++.

Original PR description:
Bytes are adjusted to respect the incoming byte type proposed in
https://discourse.llvm.org/t/rfc-add-a-new-byte-type-to-llvm-ir/89522.

Note that the current implementation of constant folding doesn't handle
bitcasts with weird types like `<8 x i3> to <3 x i8>`:


    [2 lines not shown]
DeltaFile
+305-32llvm/tools/llubi/lib/Context.cpp
+192-0llvm/test/tools/llubi/loadstore_le.ll
+190-0llvm/test/tools/llubi/loadstore_be.ll
+127-8llvm/tools/llubi/lib/Interpreter.cpp
+46-17llvm/tools/llubi/lib/Value.h
+42-4llvm/tools/llubi/lib/Context.h
+902-619 files not shown
+1,050-6515 files

LLVM/project 1af9f7cllvm/test/Transforms/LoopVectorize/RISCV transform-narrow-interleave-to-widen-memory.ll, llvm/test/Transforms/LoopVectorize/X86 epilog-vectorization-ordered-reduction.ll

[LV] Add test for IG narrowing and epilogue with ordered reductions.

Add missing test coverage for narrowing interleave groups and countable
early exit and epilogue vectorization with ordered reductions.
DeltaFile
+564-0llvm/test/Transforms/LoopVectorize/X86/epilog-vectorization-ordered-reduction.ll
+151-3llvm/test/Transforms/LoopVectorize/RISCV/transform-narrow-interleave-to-widen-memory.ll
+715-32 files

LLVM/project f441746llvm/include/llvm/ADT StringSwitch.h

[ADT] Remove deprecated variadic `StringSwitch::Cases` and `CasesLower` (#185191)

These overloads have been deprecated since October 2025.
Use the `std::initializer_list` overload instead: `.Cases({"a", "b"},
Value)`.

For more context, see https://github.com/llvm/llvm-project/pull/163117.

Assisted-by: claude

Co-authored-by: Claude Opus 4.6 <noreply at anthropic.com>
DeltaFile
+10-103llvm/include/llvm/ADT/StringSwitch.h
+10-1031 files

LLVM/project a7b56dbclang/lib/CIR/CodeGen CIRGenExprComplex.cpp CIRGenExprScalar.cpp, clang/lib/CodeGen CGExprComplex.cpp

[CIR] Remove cir.unary(plus, ...) and emit nothing for unary plus

Traditional codegen never emits any operation for unary plus — it just
visits the subexpression as a pure identity at the codegen level. Align
CIRGen with this behavior by removing Plus from UnaryOpKind entirely
and having VisitUnaryPlus directly visit the subexpression with the
appropriate promotion/demotion handling.
DeltaFile
+68-67clang/lib/CodeGen/CGExprComplex.cpp
+0-72clang/test/CIR/Transforms/canonicalize.cir
+10-26clang/test/CIR/CodeGen/complex-unary.cpp
+16-20clang/test/CIR/IR/unary.cir
+18-16clang/lib/CIR/CodeGen/CIRGenExprComplex.cpp
+14-12clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp
+126-21310 files not shown
+146-28316 files

LLVM/project 8562c4ellvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll amdgcn.bitcast.512bit.ll, llvm/test/CodeGen/RISCV clmul.ll

Merge branch 'main' into users/aokblast/elf/fix_error
DeltaFile
+84,317-78,372llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+66,293-29,491llvm/test/CodeGen/RISCV/rvv/clmulh-sdnode.ll
+25,751-24,782llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+23,663-20,281llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.960bit.ll
+21,867-18,577llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.896bit.ll
+25,051-14,920llvm/test/CodeGen/RISCV/clmul.ll
+246,942-186,4238,317 files not shown
+894,376-463,8038,323 files

LLVM/project 5d8adcbllvm/include/llvm/Object ELF.h

fixup! [Object][ELF] Fix section header zero check
DeltaFile
+5-2llvm/include/llvm/Object/ELF.h
+5-21 files

LLVM/project 7b081bfllvm/include/llvm/Object ELF.h, llvm/test/tools/llvm-readobj/ELF many-sections.s

fixup! [Object][ELF] Fix section header zero check
DeltaFile
+3-4llvm/include/llvm/Object/ELF.h
+1-1llvm/test/tools/llvm-readobj/ELF/many-sections.s
+4-52 files

LLVM/project c4bae7fllvm/include/llvm/Object ELF.h

fixup! [Object][ELF] Fix section header zero check
DeltaFile
+2-1llvm/include/llvm/Object/ELF.h
+2-11 files

LLVM/project 7804b28llvm/include/llvm/Object ELF.h

fixup! [Object][ELF] Fix section header zero check
DeltaFile
+10-10llvm/include/llvm/Object/ELF.h
+10-101 files

LLVM/project 004bfd2llvm/include/llvm/Object ELF.h

fixup! [Object][ELF] Fix section header zero check
DeltaFile
+32-4llvm/include/llvm/Object/ELF.h
+32-41 files

LLVM/project 817ef8cllvm/include/llvm/Object ELF.h

[Object][ELF] Fix section header zero check

The PN_XNUM is a necessary condition for reading shdr0 regardless of the
value of e_shoff. Without this, readShdrZero falsely returns the garbage
value in ELF header instead of emitting warning.
DeltaFile
+12-7llvm/include/llvm/Object/ELF.h
+12-71 files

LLVM/project 707b938llvm/test/tools/llvm-readobj/ELF many-segments.test

fixup! [llvm-readobj, ELF] Support reading binary with more than PN_XNUM segments.
DeltaFile
+22-7llvm/test/tools/llvm-readobj/ELF/many-segments.test
+22-71 files

LLVM/project 818168eclang-tools-extra/clang-tidy/cppcoreguidelines MissingStdForwardCheck.cpp, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] Fix false positive for constrained template parameters in `cppcoreguidelines-missing-std-forward` (#182038)

Explicit object parameters with a type constraint are skipped to avoid
false positives. They are technically still forwarding references per
[temp.deduct.call], but rarely intended to be perfectly forwarded.

Fixes #180362
DeltaFile
+58-0clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/missing-std-forward-cxx23.cpp
+10-0clang-tools-extra/clang-tidy/cppcoreguidelines/MissingStdForwardCheck.cpp
+7-0clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/missing-std-forward.rst
+4-0clang-tools-extra/docs/ReleaseNotes.rst
+79-04 files

LLVM/project 898dc85clang-tools-extra/clangd/index/dex/dexp CMakeLists.txt, clang-tools-extra/clangd/index/remote CMakeLists.txt

[clangd] Disable PCH for libs that use gRPC (#185185)

gRPC adds -pthread, which is incompatible with PCH without it. At some
point, we probably should generally switch from -lpthread to -pthread,
but until then, disable PCH for affected targets.

Fixes https://github.com/llvm/llvm-project/issues/184759.
DeltaFile
+4-1clang/cmake/modules/AddGRPC.cmake
+3-0clang-tools-extra/clangd/index/dex/dexp/CMakeLists.txt
+3-0clang-tools-extra/clangd/index/remote/CMakeLists.txt
+3-0clang-tools-extra/clangd/index/remote/marshalling/CMakeLists.txt
+3-0clang-tools-extra/clangd/index/remote/monitor/CMakeLists.txt
+3-0clang-tools-extra/clangd/index/remote/server/CMakeLists.txt
+19-11 files not shown
+22-17 files

LLVM/project 9c3c862libclc/clc/include/clc/synchronization clc_work_group_barrier.h, libclc/clc/lib/amdgcn/synchronization clc_work_group_barrier.cl

libclc: Use separate acquire and release fences in work_group_barrier
DeltaFile
+17-3libclc/clc/lib/amdgcn/synchronization/clc_work_group_barrier.cl
+1-2libclc/clc/lib/ptx-nvidiacl/synchronization/clc_work_group_barrier.cl
+1-2libclc/opencl/lib/generic/synchronization/work_group_barrier.cl
+1-1libclc/clc/include/clc/synchronization/clc_work_group_barrier.h
+20-84 files

LLVM/project fe7d245clang/lib/CIR/CodeGen CIRGenExprComplex.cpp

[CIR][NFC] ComplexType visitStmt replace NYI with unreachable (#185178)

Replace errorNYI with llvm_unreachable in ComplexType visitStmt
DeltaFile
+2-2clang/lib/CIR/CodeGen/CIRGenExprComplex.cpp
+2-21 files

LLVM/project 850892elibclc/clc/lib/generic/workitem clc_get_global_id.cl

libclc: Use enqueued local size to implement get_global_id
DeltaFile
+2-2libclc/clc/lib/generic/workitem/clc_get_global_id.cl
+2-21 files

LLVM/project 241e7f2libclc/clc/lib/generic SOURCES, libclc/clc/lib/generic/workitem clc_get_global_id.cl

libclc: Move get_global_id into clc
DeltaFile
+17-0libclc/clc/lib/generic/workitem/clc_get_global_id.cl
+2-3libclc/opencl/lib/generic/workitem/get_global_id.cl
+1-0libclc/clc/lib/generic/SOURCES
+20-33 files

LLVM/project f2055e3mlir/lib/Dialect/LLVMIR/IR LLVMDialect.cpp

use type index bitwidth
DeltaFile
+3-2mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
+3-21 files

LLVM/project 17eafe6mlir/include/mlir/Dialect/LLVMIR LLVMOps.td

add description
DeltaFile
+7-2mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
+7-21 files

LLVM/project 3572b35mlir/include/mlir/Dialect/LLVMIR LLVMOps.td

add description
DeltaFile
+29-0mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
+29-01 files

LLVM/project c56aad6llvm/lib/CodeGen/SelectionDAG SelectionDAG.cpp, llvm/test/CodeGen/X86 known-never-zero.ll

[DAG] isKnownNeverZero: Add DemandedElts handling for ROTL/ROTR/BITREVERSE/BSWAP/CTPOP/ABS (#184033)

Add DemandedElts handling for ROTL/ROTR/BITREVERSE/BSWAP/CTPOP/ABS in SelectionDAG::isKnownNeverZero

Fixes #183040
DeltaFile
+18-36llvm/test/CodeGen/X86/known-never-zero.ll
+1-1llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+19-372 files

LLVM/project 07788acmlir/test/Dialect/LLVMIR roundtrip.mlir, mlir/test/Target/LLVMIR llvmir.mlir

address review comments
DeltaFile
+11-2mlir/test/Target/LLVMIR/llvmir.mlir
+4-1mlir/test/Target/LLVMIR/Import/instructions.ll
+2-0mlir/test/Dialect/LLVMIR/roundtrip.mlir
+17-33 files

LLVM/project f8299c1libclc/clc/lib/generic SOURCES, libclc/clc/lib/generic/workitem clc_get_global_id.cl

libclc: Move get_global_id into clc
DeltaFile
+18-0libclc/clc/lib/generic/workitem/clc_get_global_id.cl
+2-3libclc/opencl/lib/generic/workitem/get_global_id.cl
+1-0libclc/clc/lib/generic/SOURCES
+21-33 files

LLVM/project 25af991libclc/clc/lib/generic/workitem clc_get_global_id.cl

libclc: Use enqueued local size to implement get_global_id
DeltaFile
+5-6libclc/clc/lib/generic/workitem/clc_get_global_id.cl
+5-61 files

LLVM/project 9321eefclang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/Dialect/IR CIRDialect.cpp

[CIR] Split CIR_UnaryOp into individual operations

Split the monolithic cir.unary operation (which dispatched on a
UnaryOpKind enum) into five separate operations: cir.inc, cir.dec,
cir.plus, cir.minus, and cir.not.

This follows the same pattern used when cir.binop was split into
individual binary operations (AddOp, SubOp, etc.).

Changes:
- Add CIR_UnaryOpInterface with getInput()/getResult() methods
- Add CIR_UnaryOp and CIR_UnaryOpWithOverflowFlag base classes
- Define IncOp, DecOp, PlusOp, MinusOp, NotOp with per-op folds
- Replace createUnaryOp() with createInc/Dec/Plus/Minus/Not builders
- Split LLVM lowering into five separate patterns
- Split LoweringPrepare complex-type handling into five handlers
- Update CIRCanonicalize and CIRSimplify for new op types
- Update all codegen files to use bool params instead of UnaryOpKind
- Remove CIR_UnaryOpKind enum and old CIR_UnaryOp definition

    [5 lines not shown]
DeltaFile
+105-117clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+90-92clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+132-29clang/include/clang/CIR/Dialect/IR/CIROps.td
+62-62clang/test/CIR/CodeGenOpenACC/private-clause-pointer-array-recipes-CtorDtor.cpp
+93-28clang/lib/CIR/Dialect/Transforms/LoweringPrepare.cpp
+41-41clang/test/CIR/CodeGenOpenACC/private-clause-pointer-array-recipes-NoOps.cpp
+523-36978 files not shown
+1,571-1,39284 files

LLVM/project 9088858clang/test/CIR/CodeGen try-catch-tmp.cpp try-catch.cpp

[CIR][NFC] Merge try-catch-tmp with try-catch test file (#185123)

Merge try-catch-tmp.cpp the with try-catch test file
DeltaFile
+0-810clang/test/CIR/CodeGen/try-catch-tmp.cpp
+802-0clang/test/CIR/CodeGen/try-catch.cpp
+802-8102 files

LLVM/project b8ea766clang/test/CodeGen/AArch64/neon intrinsics.c fullfp16.c

[Clang][AArch64] Reorganize tests for `vceqz` intrinsics (NFC) (#185090)

Group related `vceqz_*` and `vceqzd_*` tests together for consistency
and readability. Add a comment documenting the scalar variants that are
not currently covered.

No functional change.

Follow-up to #184893.
DeltaFile
+60-48clang/test/CodeGen/AArch64/neon/intrinsics.c
+7-4clang/test/CodeGen/AArch64/neon/fullfp16.c
+67-522 files

LLVM/project 04fa244clang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/Dialect/Transforms CIRCanonicalize.cpp

[CIR] Add Commutative/Idempotent traits to binary ops

Add missing MLIR traits to CIR binary operations, matching the arith
dialect conventions:

- AndOp, OrOp: Commutative, Idempotent (fixes FIXME)
- AddOp, MulOp, XorOp, MaxOp: Commutative

Add these ops to the CIRCanonicalize pass op list so trait-based
folding is exercised by applyOpPatternsGreedily.

Update testFloatingPointBinOps in binop.cpp to use computed values,
preventing DCE of the now-canonicalized ops.
DeltaFile
+65-0clang/test/CIR/Transforms/binop-traits.cir
+28-18clang/test/CIR/CodeGen/binop.cpp
+12-8clang/include/clang/CIR/Dialect/IR/CIROps.td
+6-5clang/lib/CIR/Dialect/Transforms/CIRCanonicalize.cpp
+5-5clang/test/CIR/CodeGen/size-of-vla.cpp
+2-7clang/test/CIR/CodeGen/new.cpp
+118-432 files not shown
+123-508 files