LLVM/project 901e543mlir/lib/Dialect/Math/Transforms ExpandOps.cpp, mlir/test/Dialect/Math expand-math.mlir

[mlir][Math] Fix math-expand-ops crash on math.ctlz with index type (#181539)

Fixes #179847
math.ctlz expansion called getIntOrFloatBitWidth() on the operand type
without checking. Index type has no fixed bitwidth and is not int/float,
so the assertion in Type::getIntOrFloatBitWidth() could fire.

- In convertCtlzOp, bail out with notifyMatchFailure when the element
type is not integer or float, so expansion is only applied to types with
a defined bitwidth.
- Add a test in expand-math.mlir that math.ctlz on index is left
unchanged by the pass (no crash, op preserved).
DeltaFile
+11-0mlir/test/Dialect/Math/expand-math.mlir
+5-0mlir/lib/Dialect/Math/Transforms/ExpandOps.cpp
+16-02 files

LLVM/project 6ef0613clang/test/OpenMP task_codegen.cpp, llvm/test/CodeGen/AArch64 clmul-fixed.ll

Rebase + fix comment

Created using spr 1.3.7
DeltaFile
+5,835-5,584llvm/test/tools/llvm-dwarfdump/X86/simplified-template-names.s
+5,528-5,528llvm/test/CodeGen/AMDGPU/whole-wave-functions.ll
+4,314-4,314llvm/test/CodeGen/AMDGPU/accvgpr-spill-scc-clobber.mir
+3,465-2,020clang/test/OpenMP/task_codegen.cpp
+4,716-0llvm/test/MC/AMDGPU/gfx13_asm_sop2.s
+4,564-0llvm/test/CodeGen/AArch64/clmul-fixed.ll
+28,422-17,4466,502 files not shown
+338,949-131,6536,508 files

LLVM/project 6ce9e36llvm/lib/CodeGen/GlobalISel GISelValueTracking.cpp, llvm/test/CodeGen/AArch64/GlobalISel knownbits-cttz.mir

[GISel] handle CTTZ in `computeKnownBits` (#181474)

Addresses part of #150515. Adapted from the CTLZ code below this
DeltaFile
+111-0llvm/test/CodeGen/AArch64/GlobalISel/knownbits-cttz.mir
+5-14llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-cttz-zero-undef.mir
+4-11llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-cttz.mir
+11-0llvm/lib/CodeGen/GlobalISel/GISelValueTracking.cpp
+1-3llvm/test/CodeGen/X86/GlobalISel/legalize-trailing-zeros.mir
+1-3llvm/test/CodeGen/X86/GlobalISel/legalize-trailing-zeros-undef.mir
+133-311 files not shown
+133-327 files

LLVM/project 6d033abllvm/lib/Transforms/InstCombine InstCombinePHI.cpp, llvm/test/Transforms/InstCombine phi-int2ptr-different-addrspace.ll

[InstCombine] Avoid invalid bitcast across address spaces in foldIntegerTypedPHI (#181064)

Only use a PtrToInt's source pointer as an available pointer value when
its pointer type exactly matches the inttoptr target type. This prevents
creating an invalid bitcast between differing address spaces during
foldIntegerTypedPHI.
DeltaFile
+40-0llvm/test/Transforms/InstCombine/phi-int2ptr-different-addrspace.ll
+4-2llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
+44-22 files

LLVM/project 8988fb7clang/docs ReleaseNotes.rst, clang/lib/Sema SemaCodeComplete.cpp

[clang][ObjC][CodeComplete] Fix crash on C-Style cast with parenthesized operand in ObjC++ (#180343)

In ObjC++ mode, code-completion after a C-style cast like
`(int*)(0x200)` crashed because the inner parenthesized expression was
parsed as a `ParenListExpr` (null type) due to `AllowTypes` propagation.

Fixes https://github.com/llvm/llvm-project/issues/180125
DeltaFile
+12-0clang/test/CodeCompletion/objc-cast-parenthesized-expr.m
+5-0clang/lib/Sema/SemaCodeComplete.cpp
+3-0clang/docs/ReleaseNotes.rst
+20-03 files

LLVM/project f8b1462llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 bool-mask.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+103-8llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+12-36llvm/test/Transforms/SLPVectorizer/X86/bool-mask.ll
+115-442 files

LLVM/project 347041ellvm/lib/Target/X86 X86LowerAMXIntrinsics.cpp

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

Created using spr 1.3.7

[skip ci]
DeltaFile
+2-2llvm/lib/Target/X86/X86LowerAMXIntrinsics.cpp
+2-21 files

LLVM/project ed69ffallvm/lib/Target/X86 X86LowerAMXIntrinsics.cpp, llvm/test/CodeGen/X86/AMX amx-low-intrinsics-no-amx-bitcast.ll amx-low-intrinsics.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+20-13llvm/test/CodeGen/X86/AMX/amx-low-intrinsics-no-amx-bitcast.ll
+21-3llvm/lib/Target/X86/X86LowerAMXIntrinsics.cpp
+14-4llvm/test/CodeGen/X86/AMX/amx-low-intrinsics.ll
+55-203 files

LLVM/project 1e159d2llvm/lib/Target/X86 X86LowerAMXIntrinsics.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+2-2llvm/lib/Target/X86/X86LowerAMXIntrinsics.cpp
+2-21 files

LLVM/project e819483clang/lib/Analysis/LifetimeSafety LifetimeAnnotations.cpp, clang/test/Sema warn-lifetime-safety-invalidations.cpp

[LifetimeSafety] 'erase' does not invaldiate node-based containers (#181216)

```cpp
// This pattern was previously flagged as a lifetime violation
for (auto it = my_map.begin(); it != my_map.end(); ) {
    if (should_delete(*it)) {
        my_map.erase(it++); // Safe in map, but flagged as invalidating 'it'
    } else {
        ++it;
    }
}
```
DeltaFile
+24-2clang/lib/Analysis/LifetimeSafety/LifetimeAnnotations.cpp
+15-0clang/test/Sema/warn-lifetime-safety-invalidations.cpp
+9-5clang/test/Sema/Inputs/lifetime-analysis.h
+48-73 files

LLVM/project 94257d7clang/docs index.rst CMakeLists.txt, clang/include/clang/Basic BuiltinsAMDGPUDocs.td BuiltinsAMDGPU.td

[Clang][AMDGPU][Docs] Add builtin documentation for AMDGPU builtins

Use the documentation generation infrastructure to document the AMDGPU builtins.
This PR starts with the ABI / Special Register builtins. Documentation for the
remaining builtin categories will be added incrementally in follow-up patches.
DeltaFile
+291-0clang/include/clang/Basic/BuiltinsAMDGPUDocs.td
+114-30clang/include/clang/Basic/BuiltinsAMDGPU.td
+1-0clang/docs/index.rst
+1-0clang/docs/CMakeLists.txt
+407-304 files

LLVM/project 04ef765libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions is_partitioned.pass.cpp, libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample sample.pass.cpp

[libc++] Add test_iterators.h to the modulemap (#181351)

and fix all the missing includes found by it.
DeltaFile
+5-4libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_iter_iter.pass.cpp
+5-3libcxx/test/std/algorithms/alg.sorting/alg.sort/stable.sort/pstl.stable_sort.pass.cpp
+4-3libcxx/test/std/strings/basic.string/string.modifiers/string_assign/iterator.pass.cpp
+4-2libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.pass.cpp
+4-1libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.conv/base.pass.cpp
+3-2libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/is_partitioned.pass.cpp
+25-15327 files not shown
+417-37333 files

LLVM/project 342377aclang/lib/Analysis/LifetimeSafety LifetimeAnnotations.cpp, clang/test/Sema warn-lifetime-safety-invalidations.cpp

invalidations and erase
DeltaFile
+24-2clang/lib/Analysis/LifetimeSafety/LifetimeAnnotations.cpp
+15-0clang/test/Sema/warn-lifetime-safety-invalidations.cpp
+9-5clang/test/Sema/Inputs/lifetime-analysis.h
+48-73 files

LLVM/project 40a3ec7clang/include/clang/Basic BuiltinsBase.td, clang/test/TableGen builtin-docs.td

[Clang][TableGen] Add documentation generation infrastructure for builtins

Add a `-gen-builtin-docs` TableGen backend that generates RST
documentation from builtin definitions, modeled after the existing
attribute documentation system (`-gen-attr-docs`).

The emitter generates per-builtin RST sections grouped by category, including
prototype rendering with optional named parameters (via `ArgNames`), target
feature annotations, and documentation content. A mismatch between `ArgNames`
count and prototype parameter count is a fatal error.
DeltaFile
+248-0clang/test/TableGen/builtin-docs.td
+182-0clang/utils/TableGen/ClangBuiltinsEmitter.cpp
+50-0clang/include/clang/Basic/BuiltinsBase.td
+6-0clang/utils/TableGen/TableGen.cpp
+2-0clang/utils/TableGen/TableGenBackends.h
+488-05 files

LLVM/project 194bbdcclang/test/Headers __clang_hip_math.hip, llvm/lib/Analysis ValueTracking.cpp

Address comments
DeltaFile
+193-245llvm/test/CodeGen/AMDGPU/div_v2i128.ll
+57-39llvm/lib/Analysis/ValueTracking.cpp
+44-51llvm/test/CodeGen/AMDGPU/srem64.ll
+22-28llvm/test/CodeGen/AMDGPU/urem64.ll
+24-24clang/test/Headers/__clang_hip_math.hip
+13-21llvm/test/CodeGen/AMDGPU/udiv64.ll
+353-40812 files not shown
+417-48718 files

LLVM/project f3b96cbllvm/test/CodeGen/X86 masked_gather_scatter.ll

[ScalarizeMaskedMemIntrin] Remove redundant RUN: line

5cfd815c14f378c50018f6967c027b758c3996a6 introduced redundant run lines
when doing some NewPM related cleanup. Remove them given they are
identical. LegacyPM coverage is handled through llc.
DeltaFile
+0-1llvm/test/CodeGen/X86/masked_gather_scatter.ll
+0-11 files

LLVM/project 34244cfclang/test/Headers __clang_hip_math.hip, llvm/lib/Analysis ValueTracking.cpp

Address comments
DeltaFile
+193-245llvm/test/CodeGen/AMDGPU/div_v2i128.ll
+44-51llvm/test/CodeGen/AMDGPU/srem64.ll
+56-38llvm/lib/Analysis/ValueTracking.cpp
+22-28llvm/test/CodeGen/AMDGPU/urem64.ll
+24-24clang/test/Headers/__clang_hip_math.hip
+13-21llvm/test/CodeGen/AMDGPU/udiv64.ll
+352-40712 files not shown
+416-48618 files

LLVM/project 6f253e8llvm/lib/Transforms/Vectorize VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize/AArch64 transform-narrow-interleave-to-widen-memory.ll transform-narrow-interleave-to-widen-memory-constant-ops.ll

Reapply "[VPlan] Run narrowInterleaveGroups during general VPlan optimizations. (#149706)"

This reverts commit 8d29d09309654541fb2861524276ada6a3ebf84c.

The underlying issue causing the revert has been fixed independently
as 301fa24671256734df6b7ee65f23ad885400108e.

Original message:
Move narrowInterleaveGroups to to general VPlan optimization stage.

To do so, narrowInterleaveGroups now has to find a suitable VF where all
interleave groups are consecutive and saturate the full vector width.

If such a VF is found, the original VPlan is split into 2:
 a) a new clone which contains all VFs of Plan, except VFToOptimize, and
 b) the original Plan with VFToOptimize as single VF.

The original Plan is then optimized. If a new copy for the other VFs has
been created, it is returned and the caller has to add it to the list of

    [10 lines not shown]
DeltaFile
+76-43llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+62-44llvm/test/Transforms/LoopVectorize/AArch64/transform-narrow-interleave-to-widen-memory.ll
+43-55llvm/test/Transforms/LoopVectorize/AArch64/transform-narrow-interleave-to-widen-memory-constant-ops.ll
+76-20llvm/test/Transforms/LoopVectorize/X86/transform-narrow-interleave-to-widen-memory.ll
+36-30llvm/test/Transforms/LoopVectorize/AArch64/transform-narrow-interleave-to-widen-memory-cost.ll
+13-19llvm/test/Transforms/LoopVectorize/AArch64/transform-narrow-interleave-to-widen-memory-unroll.ll
+306-2116 files not shown
+339-23512 files

LLVM/project 7f5c1b9utils/bazel/llvm-project-overlay/mlir BUILD.bazel

[bazel] fix #181217 (#181556)

fix #181217
DeltaFile
+1-1utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+1-11 files

LLVM/project ec095a5llvm/lib/Transforms/InstCombine InstCombineAndOrXor.cpp InstCombineSelect.cpp, llvm/test/Transforms/InstCombine select-and-or.ll

[InstCombine] Optimise the expression `(C && A) || (!C && B)` with `FoldOrOfLogicalAnds` (#178438)

DeltaFile
+115-1llvm/test/Transforms/InstCombine/select-and-or.ll
+79-0llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
+3-61llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+1-0llvm/lib/Transforms/InstCombine/InstCombineInternal.h
+198-624 files

LLVM/project 4bfbb08clang/test/Headers __clang_hip_math.hip, llvm/lib/Analysis ValueTracking.cpp

Address comments
DeltaFile
+193-245llvm/test/CodeGen/AMDGPU/div_v2i128.ll
+59-41llvm/lib/Analysis/ValueTracking.cpp
+44-51llvm/test/CodeGen/AMDGPU/srem64.ll
+22-28llvm/test/CodeGen/AMDGPU/urem64.ll
+24-24clang/test/Headers/__clang_hip_math.hip
+13-21llvm/test/CodeGen/AMDGPU/udiv64.ll
+355-41012 files not shown
+419-48918 files

LLVM/project 38702e0llvm/test/Transforms/InstCombine icmp-add.ll

[InstCombine][NFC] Add test for existing fold (#181555)

Resolves #73417.

The fold described in #73417 is already present in LLVM `main`, but it
isn't tested for specifically. This PR adds a test for this fold, based
on the IR in the topmost comment of that issue.
DeltaFile
+23-0llvm/test/Transforms/InstCombine/icmp-add.ll
+23-01 files

LLVM/project 255b493llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer big-number-reduced-values.ll

[SLP]Do not overflow number of the reduced values

Need to trunc the total number of the reduced values, in case if the
number is too big

Fixes #181520
DeltaFile
+14-0llvm/test/Transforms/SLPVectorizer/big-number-reduced-values.ll
+3-1llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+17-12 files

LLVM/project c3f5e45cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb mlir-support.gdb, flang/lib/Optimizer/CodeGen CodeGen.cpp

rename
DeltaFile
+3-3flang/lib/Optimizer/CodeGen/CodeGen.cpp
+3-3mlir/test/Dialect/Builtin/Bytecode/attrs.mlir
+2-3mlir/lib/Bindings/Python/IRAttributes.cpp
+1-4mlir/include/mlir/IR/BuiltinAttributes.td
+2-2cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/mlir-support.gdb
+1-1mlir/docs/Tutorials/Toy/Ch-2.md
+12-161 files not shown
+13-177 files

LLVM/project c087fffllvm/test/tools/llubi vector.ll struct.ll, llvm/tools/llubi/lib Interpreter.cpp Value.h

[llubi] Add basic support for vector and aggregate ops (#181544)

DeltaFile
+64-0llvm/tools/llubi/lib/Interpreter.cpp
+35-0llvm/test/tools/llubi/vector.ll
+20-0llvm/test/tools/llubi/struct.ll
+6-0llvm/tools/llubi/lib/Value.h
+125-04 files

LLVM/project ecc8dd5mlir/include/mlir/IR BuiltinAttributes.h BuiltinAttributes.td

move to TD
DeltaFile
+0-42mlir/include/mlir/IR/BuiltinAttributes.h
+16-8mlir/include/mlir/IR/BuiltinAttributes.td
+16-502 files

LLVM/project b196067.github/workflows libc-fullbuild-tests.yml

[Github][libc] Use a container for fullbuild tests (#181436)

This avoids needing to set up deps every time and avoids failures due to
failed dependency installation.

Closed #150490.
DeltaFile
+11-17.github/workflows/libc-fullbuild-tests.yml
+11-171 files

LLVM/project 2e885b9mlir/include/mlir/IR BuiltinAttributes.h BuiltinAttributes.td, mlir/lib/IR BuiltinAttributes.cpp AsmPrinter.cpp

[mlir][IR] Rename + merge DenseElementsAttr
DeltaFile
+164-582mlir/include/mlir/IR/BuiltinAttributes.h
+255-38mlir/include/mlir/IR/BuiltinAttributes.td
+40-62mlir/lib/IR/BuiltinAttributes.cpp
+5-21mlir/lib/IR/AsmPrinter.cpp
+5-5mlir/lib/IR/AttributeDetail.h
+2-3mlir/include/mlir/IR/BuiltinDialectBytecode.td
+471-7119 files not shown
+484-72515 files

LLVM/project e86750bllvm/test/tools/llubi controlflow.ll stack_overflow.ll, llvm/tools/llubi/lib Interpreter.cpp Context.cpp

[llubi] Add basic support for icmp, terminators and function calls (#181393)

Note: icmp with integers is also introduced in this patch, as it is
needed to compute branch conditions.
DeltaFile
+430-0llvm/test/tools/llubi/controlflow.ll
+251-3llvm/tools/llubi/lib/Interpreter.cpp
+107-0llvm/test/tools/llubi/stack_overflow.ll
+63-4llvm/tools/llubi/lib/Context.cpp
+23-0llvm/test/tools/llubi/infinite_loop.ll
+17-2llvm/tools/llubi/lib/Context.h
+891-913 files not shown
+1,036-919 files

LLVM/project 70905e0llvm/docs ReleaseNotes.md, llvm/lib/Analysis BranchProbabilityInfo.cpp

[RFC][IR] Remove `Constant::isZeroValue` (#181521)

`Constant::isZeroValue` currently behaves same as
`Constant::isNullValue` for all types except floating-point, where it
additionally returns true for negative zero (`-0.0`). However, in
practice, almost all callers operate on integer/pointer types where the
two are equivalent, and the few FP-relevant callers have no meaningful
dependence on the `-0.0` behavior.

This PR removes `isZeroValue` to eliminate the confusing API. All
callers are changed to `isNullValue` with no test failures.

`isZeroValue` will be reintroduced in a future change with clearer
semantics: when null pointers may have non-zero bit patterns,
`isZeroValue` will check for bitwise-all-zeros, while `isNullValue` will
check for the semantic null (which
may be non-zero).
DeltaFile
+9-9llvm/unittests/Analysis/ValueLatticeTest.cpp
+1-17llvm/lib/IR/Constants.cpp
+3-3llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
+6-0llvm/docs/ReleaseNotes.md
+2-3llvm/lib/Analysis/BranchProbabilityInfo.cpp
+2-2llvm/lib/IR/AutoUpgrade.cpp
+23-3430 files not shown
+60-7436 files