[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
[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.
[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>
[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.
[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.
[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
[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.
[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]
[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.
[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.