LLVM/project bf845a4polly/lib/Analysis ScopBuilder.cpp

[Polly] Add null pointer check before size retrieval (#174309)

This patch avoids assertion failures by ensuring a null pointer check is
performed before accessing the object's size.
Note: The corresponding test case remains too large even after
reduction, so it has not been included in this patch.

Fixes #174147
DeltaFile
+3-0polly/lib/Analysis/ScopBuilder.cpp
+3-01 files

LLVM/project d363c7fllvm/test/CodeGen/AArch64 cls.ll

[AArch64] cls.ll - regenerate test checks (#175948)

Noticed when reviewing #174824
DeltaFile
+10-4llvm/test/CodeGen/AArch64/cls.ll
+10-41 files

LLVM/project 676fc58libcxx/include/__algorithm ranges_equal.h equal.h

[libc++] Fix use of static in constexpr (#175667)

DeltaFile
+2-2libcxx/include/__algorithm/ranges_equal.h
+1-1libcxx/include/__algorithm/equal.h
+3-32 files

LLVM/project 83586bellvm/lib/Target/X86 X86ISelLowering.cpp, llvm/test/CodeGen/X86 masked_load.ll masked_store.ll

[X86] Ensure a (vXi1 bitcast(iX Mask)) memory mask is canonicalised for extension before it might get split by legalisation (#175769)

Masked load/store/gathers often need to bitcast the mask from a
bitcasted integer.

On pre-AVX512 targets this can lead to some rather nasty scalarization
if we don't custom expand the mask first.

This patch uses the canonicalizeBoolMask /combineToExtendBoolVectorInReg
helper functions to canonicalise the masks, similar to what we already
do for vselect expansion.

Alternative to #175385

Fixes #59789
DeltaFile
+66-178llvm/test/CodeGen/X86/masked_load.ll
+62-176llvm/test/CodeGen/X86/masked_store.ll
+77-27llvm/lib/Target/X86/X86ISelLowering.cpp
+10-66llvm/test/CodeGen/X86/masked_gather.ll
+215-4474 files

LLVM/project e8adda5llvm/test/CodeGen/AArch64 neon-vcmla.ll neon-dot-product.ll

[AArch64] Add extra BE test coverage for lane instructions. NFC
DeltaFile
+604-168llvm/test/CodeGen/AArch64/neon-vcmla.ll
+358-62llvm/test/CodeGen/AArch64/neon-dot-product.ll
+43-2llvm/test/CodeGen/AArch64/popcount.ll
+1,005-2323 files

LLVM/project 98d6f16llvm/test/tools/llvm-objdump/MachO LLVM-bundle.test, llvm/test/tools/llvm-objdump/MachO/Inputs LLVM-bundle.macho-x86_64

[llvm-objdump][test] Remove dead MachO LLVM-bundle test (#172786)

This test has been permanently unsupported since eb601430d3d7 removed
libxar support and the xar feature from lit.cfg.py in October 2023.
DeltaFile
+0-60llvm/test/tools/llvm-objdump/MachO/LLVM-bundle.test
+0-0llvm/test/tools/llvm-objdump/MachO/Inputs/LLVM-bundle.macho-x86_64
+0-602 files

LLVM/project fda19b9clang/lib/CIR/CodeGen CIRGenBuiltinAArch64.cpp

[CIR] Add additional NYI checks for SVE builtins (#175575)

This change extends the NYI checks recently introduced in #174433 by
adding further validation of SVE builtin type modifiers. For example:

```cpp
SVETypeFlags typeFlags(builtinIntrInfo->typeModifier);

// Unsupported flag — bail out
if (typeFlags.someFlag())
  cgm.errorNYI();
```

The newly added checks mirror the logic in
CodeGen/TargetBuiltins/ARM.cpp, specifically in:
  * `CodeGenFunction::EmitAArch64SVEBuiltinExpr`,

which defines the default code-generation path for SVE builtins.


    [2 lines not shown]
DeltaFile
+88-3clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp
+88-31 files

LLVM/project c57e435clang/lib/Analysis/LifetimeSafety FactsGenerator.cpp, clang/unittests/Analysis LifetimeSafetyTest.cpp

[LifetimeSafety] Fix crash in derived-to-base conversion with different origin shapes (#175928)

DeltaFile
+11-5clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp
+12-0clang/unittests/Analysis/LifetimeSafetyTest.cpp
+23-52 files

LLVM/project 3b51c1cclang/lib/CIR/Dialect/Transforms/TargetLowering TargetLoweringInfo.h TargetLoweringInfo.cpp, clang/lib/CIR/Lowering/DirectToLLVM LowerToLLVM.cpp

[CIR] Proper lowering of atomic sync scope to LLVM (#173393)

This patch sets up a framework to properly lower atomic sync scopes from
CIR to LLVM. Since the lowering is target-specific, this patch first
upstreams a minimum implementation of the TargetLoweringInfo class. It
then adds a virtual function there to handle the lowering of atomic sync
scopes in a target-specific way.
DeltaFile
+31-0clang/lib/CIR/Dialect/Transforms/TargetLowering/TargetLoweringInfo.h
+25-0clang/lib/CIR/Dialect/Transforms/TargetLowering/TargetLoweringInfo.cpp
+14-6clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+13-0clang/lib/CIR/Dialect/Transforms/TargetLowering/LowerModule.cpp
+4-4clang/test/CIR/CodeGen/atomic-scoped.c
+4-0clang/lib/CIR/Dialect/Transforms/TargetLowering/LowerModule.h
+91-102 files not shown
+93-108 files

LLVM/project f54fc39mlir/include/mlir/Dialect/SPIRV/IR SPIRVEnums.h, mlir/lib/Conversion/SPIRVCommon Pattern.h

[mlir][SPIRV] Move getDecorationString to SPIRVEnums utilities (NFC). (#174222)

Moves the getDecorationString() helper from the conversion layer's
SPIRVCommon/Pattern.h to the public SPIRVEnums.h header. This makes the
utility accessible to both the SPIRV dialect and conversion layers,
following proper architectural layering.

This continues the refactoring started in #174145.
DeltaFile
+0-12mlir/lib/Conversion/SPIRVCommon/Pattern.h
+2-4mlir/lib/Dialect/SPIRV/IR/MemoryOps.cpp
+4-0mlir/lib/Dialect/SPIRV/IR/SPIRVEnums.cpp
+4-0mlir/include/mlir/Dialect/SPIRV/IR/SPIRVEnums.h
+1-1mlir/lib/Dialect/SPIRV/IR/SPIRVDialect.cpp
+11-175 files

LLVM/project 7d5fe7eclang/lib/AST/ByteCode Interp.cpp, clang/test/AST/ByteCode c.c

[clang][bytecode] Reject all function calls in C (#175920)

C doesn't have constexpr functions, so this can't ever work anyway.

Fixes https://github.com/llvm/llvm-project/issues/175877
DeltaFile
+6-0clang/test/AST/ByteCode/c.c
+5-0clang/lib/AST/ByteCode/Interp.cpp
+11-02 files

LLVM/project c8ba380llvm/lib/Transforms/InstCombine InstCombineSimplifyDemanded.cpp, llvm/test/Transforms/InstCombine simplify-demanded-fpclass-fmul.ll simplify-demanded-fpclass.ll

InstCombine: Teach SimplifyDemandedFPClass to infer nnan and ninf on fmul
DeltaFile
+27-27llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-fmul.ll
+12-1llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+5-5llvm/test/Transforms/InstCombine/simplify-demanded-fpclass.ll
+44-333 files

LLVM/project 188d424llvm/include/llvm/Support KnownFPClass.h, llvm/lib/Analysis ValueTracking.cpp

InstCombine: Handle fdiv in SimplifyDemandedFPClass
DeltaFile
+127-148llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-fdiv.ll
+130-1llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+46-0llvm/lib/Support/KnownFPClass.cpp
+3-33llvm/lib/Analysis/ValueTracking.cpp
+10-0llvm/include/llvm/Support/KnownFPClass.h
+316-1825 files

LLVM/project 469ee03llvm/test/Transforms/InstCombine simplify-demanded-fpclass-fdiv.ll

InstCombine: Add baseline fdiv SimplifyDemandedFPClass tests
DeltaFile
+2,321-0llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-fdiv.ll
+2,321-01 files

LLVM/project ad3a307llvm/include/llvm/Support KnownFPClass.h, llvm/lib/Analysis ValueTracking.cpp

InstCombine: Handle fsub in SimplifyDemandedFPClass

alive2 fails on some of the tests, but this is due to existing
folds in instsimplify and https://github.com/AliveToolkit/alive2/issues/1273
DeltaFile
+55-73llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-fsub.ll
+19-60llvm/lib/Analysis/ValueTracking.cpp
+21-0llvm/lib/Support/KnownFPClass.cpp
+11-4llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+5-0llvm/include/llvm/Support/KnownFPClass.h
+111-1375 files

LLVM/project 79d2cc4llvm/lib/Analysis ValueTracking.cpp, llvm/lib/IR Instruction.cpp Operator.cpp

[IR] Teach `drop/hasPoisonGeneratingAnnotations()` about `abs`, `ctlz` and `cttz`
DeltaFile
+9-9llvm/test/Transforms/InstCombine/freeze-integer-intrinsics.ll
+13-0llvm/lib/IR/Instruction.cpp
+11-0llvm/lib/IR/Operator.cpp
+2-3llvm/lib/Analysis/ValueTracking.cpp
+35-124 files

LLVM/project 437dbbbllvm/lib/Transforms/InstCombine InstructionCombining.cpp, llvm/test/Transforms/InstCombine branch.ll

[InstCombine][profcheck] Propogate profile metadata when transforming br (X && !Y) to br (!X || Y)

Updated visitBranchInst to propagate and swap !prof metadata when transforming br (X && !Y) to br (!X || Y).
DeltaFile
+31-23llvm/test/Transforms/InstCombine/branch.ll
+12-0llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+43-232 files

LLVM/project 94913cfllvm/test/CodeGen/WebAssembly slp-memory-interleave.ll memory-interleave.ll

[NFC][WebAssembly] More memory interleave tests (#175918)

DeltaFile
+258-0llvm/test/CodeGen/WebAssembly/slp-memory-interleave.ll
+162-0llvm/test/CodeGen/WebAssembly/memory-interleave.ll
+420-02 files

LLVM/project 98adb36llvm/lib/Target/X86 X86ISelLowering.cpp, llvm/test/CodeGen/X86 phaddsub-undef.ll

[X86] isHorizontalBinOp - discard any shuffle that resolves to an all sentinel shuffle mask (#175931)

If the mask resolves to all-undef/zero then it can't be used - these can
theoretically appear if we're combining before the source operands have
constant folded away (in this case due to the avg intrinsic not folding
away until later into legalisation) - yet another case of working around
a poorly topological sorted DAG

Fixes #175802
DeltaFile
+20-8llvm/test/CodeGen/X86/phaddsub-undef.ll
+2-0llvm/lib/Target/X86/X86ISelLowering.cpp
+22-82 files

LLVM/project efa32e3clang/lib/StaticAnalyzer/Core CallEvent.cpp, clang/test/Analysis call-invalidation.cpp

[analyzer] Invalidate the object in opaque ctor calls regardless if an arg refers to it (#170887)

The conservative call invalidation logic is a bit complicated, and would
deserve some refactoring.

When a call has some arguments, we escape them. Except, if its a pointer
to constant storage - because we assume that the program honors
const-correctness.

In that case, it puts it in the "Preserved" list to keep its contents.
However, if we had a constructor call that's job is to initialize an
object had a const pointer/reference parameter then the invalidation
didn't take place.

This meant that if the object was on the stack, that we start warning
about uninitialized fields when accessed. (See the example) Similar
could be achieved on the heap of course.

We should have honored the fact that the constructor should initialize

    [7 lines not shown]
DeltaFile
+25-5clang/lib/StaticAnalyzer/Core/CallEvent.cpp
+29-0clang/test/Analysis/call-invalidation.cpp
+54-52 files

LLVM/project 58b91e7llvm/unittests/IR MetadataTest.cpp

Revert "Drop the summation unittest since it's already covered by the gvn lit tests"

This reverts commit fb0d7df21794ab50eaab4cb6e249679089a5a501.
DeltaFile
+26-0llvm/unittests/IR/MetadataTest.cpp
+26-01 files

LLVM/project 59df0a6llvm/unittests/IR MetadataTest.cpp

Drop the summation unittest since it's already covered by the gvn lit tests
DeltaFile
+0-26llvm/unittests/IR/MetadataTest.cpp
+0-261 files

LLVM/project c9c62d8llvm/unittests/IR MetadataTest.cpp

clang format
DeltaFile
+6-3llvm/unittests/IR/MetadataTest.cpp
+6-31 files

LLVM/project 3968081llvm/lib/IR Metadata.cpp, llvm/unittests/IR MetadataTest.cpp

[Metadata][profcheck] Handle identical MDNodes in getMergedProfMetadata

This fixes a bug where !prof metadata was dropped from SelectInsts when GVN simplified/merged them.
Guarded by -profcheck-disable-metadata-fixes. Exposed by the tests in
Transforms/SampleProfile.
DeltaFile
+50-0llvm/unittests/IR/MetadataTest.cpp
+12-0llvm/lib/IR/Metadata.cpp
+62-02 files

LLVM/project 4f7939ellvm/lib/Transforms/InstCombine InstructionCombining.cpp, llvm/test/Transforms/InstCombine branch-metadata.ll

[InstCombine][profcheck] Propogate profile metadata when transforming br (X && !Y) to br (!X || Y)

Updated visitBranchInst to propagate and swap !prof metadata when transforming br (X && !Y) to br (!X || Y).
DeltaFile
+27-0llvm/test/Transforms/InstCombine/branch-metadata.ll
+13-0llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+40-02 files

LLVM/project b6efc9ellvm/utils profcheck-xfail.txt

Update profcheck-xfail.txt
DeltaFile
+3-2llvm/utils/profcheck-xfail.txt
+3-21 files

LLVM/project 7db925allvm/lib/IR Metadata.cpp

Move the check after merging for calls to simplify the condition
DeltaFile
+3-6llvm/lib/IR/Metadata.cpp
+3-61 files

LLVM/project 0b7d14emlir/lib/Dialect/XeGPU/IR XeGPUDialect.cpp, mlir/lib/Dialect/XeGPU/Transforms XeGPUPeepHoleOptimizer.cpp XeGPUOptimizeBlockLoads.cpp

[MLIR][XeGPU] Add 2D `vector.multi_reduction` optimization (#171154)

DeltaFile
+587-0mlir/lib/Dialect/XeGPU/Transforms/XeGPUPeepHoleOptimizer.cpp
+0-491mlir/lib/Dialect/XeGPU/Transforms/XeGPUOptimizeBlockLoads.cpp
+313-0mlir/test/Dialect/XeGPU/peephole-optimize.mlir
+0-280mlir/test/Dialect/XeGPU/optimize-transpose.mlir
+42-4mlir/test/Dialect/XeGPU/subgroup-distribute.mlir
+18-0mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp
+960-7756 files not shown
+984-79012 files

LLVM/project bd65ec1llvm/lib/Target/AArch64 AArch64ISelLowering.cpp AArch64InstrInfo.td, llvm/test/CodeGen/AArch64 arm64-int-neon.ll

[AArch64] Add lowering for NEON saturating shift intrinsics (#171485)

This patch extends on the work done in #161840 and adds lowering with
bitcasts for saturating shift intrinsics.
DeltaFile
+91-1llvm/test/CodeGen/AArch64/arm64-int-neon.ll
+22-11llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+12-7llvm/lib/Target/AArch64/AArch64InstrInfo.td
+8-3llvm/lib/Target/AArch64/AArch64InstrFormats.td
+133-224 files

LLVM/project efd66e5clang/test/Sema warn-lifetime-analysis-nocfg.cpp warn-lifetime-safety.cpp, clang/test/Sema/Inputs lifetime-analysis.h

[LifetimeSafety] Test lifetime safety on stmt-local analysis test suite
DeltaFile
+217-55clang/test/Sema/warn-lifetime-analysis-nocfg.cpp
+9-9clang/test/Sema/warn-lifetime-safety.cpp
+9-1clang/test/Sema/Inputs/lifetime-analysis.h
+235-653 files