LLVM/project f9d53b2llvm/test/Transforms/LoopVectorize/VPlan vplan-scev-address-idioms.ll

[VPlan] Add tests for more address idioms not by VPlan's SCEV (NFC). (#219843)

Add tests gaps currently handled by IR based SCEV analysis, but not
VPlan-based SCEV analysis.
DeltaFile
+975-0llvm/test/Transforms/LoopVectorize/VPlan/vplan-scev-address-idioms.ll
+975-01 files

LLVM/project 5c9c1f5llvm/include/llvm/ADT FoldingSet.h, llvm/lib/Support FoldingSet.cpp

[ADT] Inline FoldingSet's equality dispatch (#219784)

FoldingSetBase compares nodes through a FoldingSetInfo table of function
pointers, which the compiler cannot inline through to the node's
Profile().
Add a probe() template taking the match test as a template parameter,
and build lookup, FindNodeOrInsertPos and getOrInsert on it in
FoldingSetImpl where the trait is known.

LLM-aided
DeltaFile
+60-64llvm/include/llvm/ADT/FoldingSet.h
+1-54llvm/lib/Support/FoldingSet.cpp
+61-1182 files

LLVM/project a6e5d88llvm/lib/Analysis ValueTracking.cpp, llvm/test/Transforms/InstCombine stepvector-known-bits.ll

[ValueTracking] Compute known bits for llvm.stepvector (#219779)

Teach ValueTracking to infer high zero bits for `llvm.stepvector` from
the
vector element count and a finite `vscale_range`.

Conservatively give up when the lane-count calculation overflows the
element
width, since `llvm.stepvector` truncates out-of-range lane indices.

This allows existing sign-bit reasoning to eliminate redundant
extensions for
bounded step vectors.

The regression tests cover scalable and fixed vectors, bounded and
unbounded
`vscale_range`, lane-index truncation, unconstrained inputs, and
signed-i32
boundary cases.

Fixes #219776.
DeltaFile
+117-0llvm/test/Transforms/InstCombine/stepvector-known-bits.ll
+24-0llvm/lib/Analysis/ValueTracking.cpp
+141-02 files

LLVM/project 8e32376clang/include/clang/AST ASTContext.h, clang/lib/AST NestedNameSpecifier.cpp DeclarationName.cpp

[clang] Migrate AST/Sema FoldingSet users to typed lookup/insert. NFC (#219766)
DeltaFile
+246-287clang/lib/AST/ASTContext.cpp
+15-16clang/lib/AST/DeclarationName.cpp
+4-6clang/lib/Sema/SemaConcept.cpp
+3-3clang/lib/Sema/SemaLookup.cpp
+3-3clang/lib/AST/NestedNameSpecifier.cpp
+1-1clang/include/clang/AST/ASTContext.h
+272-3166 files

LLVM/project 868246fllvm/lib/Transforms/InstCombine InstCombineAndOrXor.cpp, llvm/test/Transforms/InstCombine fsh.ll

[InstCombine] Recognize rotate patterns with `X + 1` shift counts as funnel shifts (#214035)

fix #173132

godbolt: https://llvm.godbo.lt/z/WE6Woxqj4
alive2: https://alive2.llvm.org/ce/z/SYa7uG
https://alive2.llvm.org/ce/z/Y6HqoV
DeltaFile
+219-0llvm/test/Transforms/InstCombine/fsh.ll
+11-0llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
+230-02 files

LLVM/project 8c3eb53llvm/include/llvm/CodeGen SelectionDAG.h, llvm/include/llvm/CodeGen/GlobalISel CSEMIRBuilder.h CSEInfo.h

[CodeGen] Migrate to FoldingSet's typed lookup/insert/erase. NFC (#219830)

Rename SelectionDAG::FindNodeOrInsertPos to lookupNode and use the new
FoldingSetInsertToken API in place of `void *`.

In SelectionDAG the token is named `InsertToken`, as Token there means
the chain operand (TokenFactor, EntryToken).
DeltaFile
+187-186llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+20-19llvm/lib/CodeGen/GlobalISel/CSEInfo.cpp
+15-13llvm/include/llvm/CodeGen/SelectionDAG.h
+13-14llvm/lib/CodeGen/GlobalISel/CSEMIRBuilder.cpp
+5-4llvm/include/llvm/CodeGen/GlobalISel/CSEInfo.h
+4-4llvm/include/llvm/CodeGen/GlobalISel/CSEMIRBuilder.h
+244-2402 files not shown
+250-2488 files

LLVM/project 88f3a79llvm/lib/Transforms/Utils SCCPSolver.cpp, llvm/test/Transforms/SCCP ipsccp-recursive-arg-update.ll

[SCCP] Fix missing worklist push for recursive calls that update lattice values (#219826)

For a recursive call, the call instruction itself is a user of the
function's arguments. Because I == CurI, I->comesBefore(CurI) is false,
and the condition triggers an early return. The recursive call
instruction was skipped and never pushed back onto the worklist, halting
the solver prematurely before reaching a fixpoint. This caused the
solver to incorrectly believe arguments were hardcoded constants rather
than a wider constant range, resulting in invalid branch folding.

The Fix: This patch updates the condition to explicitly check if I comes
strictly after CurI.

Fixes: https://github.com/llvm/llvm-project/issues/219503
DeltaFile
+37-0llvm/test/Transforms/SCCP/ipsccp-recursive-arg-update.ll
+1-1llvm/lib/Transforms/Utils/SCCPSolver.cpp
+38-12 files

LLVM/project 5bea437llvm/lib/Target/X86 X86CodeGenPassBuilder.cpp, llvm/test/CodeGen/X86/GlobalISel binop.ll

[X86][NewPM] Wire up GISel pipeline (#219785)
DeltaFile
+42-6llvm/lib/Target/X86/X86CodeGenPassBuilder.cpp
+1-0llvm/test/CodeGen/X86/GlobalISel/binop.ll
+43-62 files

LLVM/project b139ae5llvm/lib/Target/AArch64/AsmParser AArch64AsmParser.cpp, llvm/test/MC/AArch64 arm64-diags.s

[AArch64] Fix crash parsing an operand with both :specifier: and `@specifier` (#219737)

`add x3, x5, :lo12:sym at PAGEOFF` hits llvm_unreachable in applySpecifier:
Mach-O accepts both ELF style `:specifier:` and its own `@specifier`.
When an ELF-style :specifier already wraps the expression,
applySpecifier then receives an unexpected MCSpecifierExpr.

Parse `@specifier` only when no :specifier: is present.
DeltaFile
+2-1llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+3-0llvm/test/MC/AArch64/arm64-diags.s
+5-12 files

LLVM/project 03cbe93compiler-rt/test/fuzzer merge-sigusr.test

[fuzzer] Restrict merge-sigusr.test to Linux (#216702)

The `fuzzer/merge-sigusr.test` test causes the whole `ninja check-all`
run on NetBSD to be killed with `SIGUSR2`.

It turns out the test is highly Linux-specific in at least two ways:

- The `setsid` command doesn't exist on any of Darwin, FreeBSD, and
NetBSD.

- `ps -o sess= <pid>` is highly unportable, too:

  - FreeBSD `ps` doesn't have the `sess` keyword at all.

- NetBSD `ps` does, but with different semantics: it's the session
pointer, not the session id as on Linux, which leads to randomly killing
unrelated processes.

Therefore this patch restricts the test to Linux instead of simply

    [6 lines not shown]
DeltaFile
+3-3compiler-rt/test/fuzzer/merge-sigusr.test
+3-31 files

LLVM/project 01efbeacompiler-rt/test/msan fork.cpp, compiler-rt/test/sanitizer_common/TestCases/Posix fork_threaded.c

[sanitizer] Skip hanging tests on FreeBSD (#216703)

Three sanitizer tests hang indefinitely on FreeBSD:

```
MemorySanitizer-X86_64 :: fork.cpp
SanitizerCommon-tsan-x86_64-FreeBSD :: Posix/fork_threaded.c
ThreadSanitizer-x86_64 :: fork_multithreaded.cpp
```

All of them loop and don't time out, so they need to be terminated
manually for `ninja check-all` to complete. To avoid this, this patch
skips the affected tests.

Tested on `x86_64-pc-freebsd15.1`, `x86_64-pc-netbsd11.0` and
`x86_64-pc-linux-gnu`.

(cherry picked from commit cb2f67d1556c1232f99b4512a35129ec04f73c75)
DeltaFile
+3-0compiler-rt/test/sanitizer_common/TestCases/Posix/fork_threaded.c
+1-1compiler-rt/test/msan/fork.cpp
+2-0compiler-rt/test/tsan/fork_multithreaded.cpp
+6-13 files

LLVM/project 539a51allvm/lib/Transforms/InstCombine InstCombineSelect.cpp, llvm/test/Transforms/InstCombine select-bitext.ll

[InstCombine] narrow select to match trunc condition operand size (#219794)

changed to matches the cmp handling and avoids some regressions from
https://github.com/llvm/llvm-project/pull/184182
DeltaFile
+26-0llvm/test/Transforms/InstCombine/select-bitext.ll
+2-2llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+28-22 files

LLVM/project 492a3a4llvm/lib/Transforms/InstCombine InstCombineCasts.cpp, llvm/test/Transforms/InstCombine cast-select.ll

[InstCombine] Don't change the size of a select if it would mismatch its trunc condition operand size (#219789)

Matching cmp handling and stops infinit loop for
https://github.com/llvm/llvm-project/pull/219794
DeltaFile
+77-0llvm/test/Transforms/InstCombine/cast-select.ll
+3-2llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
+80-22 files

LLVM/project 98f0f00flang/include/flang/Semantics openmp-modifiers.h openmp-utils.h, flang/lib/Semantics check-omp-loop.cpp resolve-directives.cpp

[flang][OpenMP] Switch OpenMP version from unsigned to llvm::omp::Version

Also make llvm::omp::Version converting constructor/operstor explicit.
DeltaFile
+91-88flang/lib/Semantics/check-omp-structure.cpp
+20-18flang/include/flang/Semantics/openmp-utils.h
+18-17flang/lib/Semantics/openmp-utils.cpp
+10-10flang/include/flang/Semantics/openmp-modifiers.h
+7-7flang/lib/Semantics/resolve-directives.cpp
+6-6flang/lib/Semantics/check-omp-loop.cpp
+152-14621 files not shown
+220-20227 files

LLVM/project 7e20a1aclang/include/clang/AST OpenMPClause.h, clang/lib/AST DeclPrinter.cpp StmtPrinter.cpp

[clang][OpenMP] Switch OpenMP version from unsigned to llvm::omp::Version
DeltaFile
+61-58clang/lib/Sema/SemaOpenMP.cpp
+16-16clang/lib/Parse/ParseOpenMP.cpp
+6-9clang/lib/AST/StmtPrinter.cpp
+4-3clang/lib/Sema/TreeTransform.h
+3-3clang/lib/AST/DeclPrinter.cpp
+3-2clang/include/clang/AST/OpenMPClause.h
+93-912 files not shown
+98-928 files

LLVM/project 968f030clang/lib/AST/ByteCode Source.h Source.cpp

[clang][bytecode][NFC] Remove unused SourceMapper functions (#219786)
DeltaFile
+0-12clang/lib/AST/ByteCode/Source.cpp
+0-6clang/lib/AST/ByteCode/Source.h
+0-182 files

LLVM/project 65a8ecdflang/include/flang/Semantics openmp-modifiers.h openmp-utils.h, flang/lib/Semantics check-omp-loop.cpp resolve-directives.cpp

[flang][OpenMP] Switch OpenMP version from unsigned to llvm::omp::Version

Also make llvm::omp::Version converting constructor/operstor explicit.
DeltaFile
+91-88flang/lib/Semantics/check-omp-structure.cpp
+20-18flang/include/flang/Semantics/openmp-utils.h
+18-17flang/lib/Semantics/openmp-utils.cpp
+10-10flang/include/flang/Semantics/openmp-modifiers.h
+7-7flang/lib/Semantics/resolve-directives.cpp
+6-6flang/lib/Semantics/check-omp-loop.cpp
+152-14621 files not shown
+220-20227 files

LLVM/project 5e5d1adclang/include/clang/Basic LangOptions.h, clang/lib/AST DeclPrinter.cpp StmtPrinter.cpp

[clang][OpenMP] Switch OpenMP version from unsigned to llvm::omp::Version
DeltaFile
+61-58clang/lib/Sema/SemaOpenMP.cpp
+16-16clang/lib/Parse/ParseOpenMP.cpp
+6-9clang/lib/AST/StmtPrinter.cpp
+4-3clang/lib/Sema/TreeTransform.h
+3-3clang/lib/AST/DeclPrinter.cpp
+6-0clang/include/clang/Basic/LangOptions.h
+96-892 files not shown
+100-928 files

LLVM/project b369c19llvm/include/llvm/Frontend/OpenMP OMPDescriptors.h OMPVersion.h, llvm/lib/Frontend/OpenMP OMPDescriptors.inc

[OpenMP] Make OpenMP version have separate type

It's unsigned now. Giving it a separate type would make the code clearer,
and it would make it easier to change the effective type if it's ever
needed.
DeltaFile
+788-788llvm/lib/Frontend/OpenMP/OMPDescriptors.inc
+63-0llvm/include/llvm/Frontend/OpenMP/OMPVersion.h
+29-17llvm/utils/TableGen/Basic/DirectiveEmitter.cpp
+13-13llvm/test/TableGen/directive1.td
+12-12llvm/test/TableGen/directive2.td
+10-10llvm/include/llvm/Frontend/OpenMP/OMPDescriptors.h
+915-84011 files not shown
+975-88917 files

LLVM/project f84f14bflang/include/flang/Semantics openmp-modifiers.h openmp-utils.h, flang/lib/Semantics check-omp-loop.cpp resolve-directives.cpp

[flang][OpenMP] Switch OpenMP version from unsigned to llvm::omp::Version

Also make llvm::omp::Version converting constructor/operstor explicit.
DeltaFile
+91-88flang/lib/Semantics/check-omp-structure.cpp
+20-18flang/include/flang/Semantics/openmp-utils.h
+18-17flang/lib/Semantics/openmp-utils.cpp
+10-10flang/include/flang/Semantics/openmp-modifiers.h
+7-7flang/lib/Semantics/resolve-directives.cpp
+6-6flang/lib/Semantics/check-omp-loop.cpp
+152-14621 files not shown
+220-20027 files

LLVM/project e4524f1clang/include/clang/Basic LangOptions.h, clang/lib/AST DeclPrinter.cpp StmtPrinter.cpp

[clang][OpenMP] Switch OpenMP version from unsigned to llvm::omp::Version
DeltaFile
+61-58clang/lib/Sema/SemaOpenMP.cpp
+16-16clang/lib/Parse/ParseOpenMP.cpp
+6-9clang/lib/AST/StmtPrinter.cpp
+4-3clang/lib/Sema/TreeTransform.h
+3-3clang/lib/AST/DeclPrinter.cpp
+6-0clang/include/clang/Basic/LangOptions.h
+96-892 files not shown
+100-928 files

LLVM/project 6709c95llvm/include/llvm/Frontend/OpenMP OMP.h OMPVersion.h, llvm/lib/Frontend/OpenMP OMPDescriptors.inc

[OpenMP] Make OpenMP version have separate type

It's unsigned now. Giving it a separate type would make the code clearer,
and it would make it easier to change the effective type if it's ever
needed.
DeltaFile
+788-788llvm/lib/Frontend/OpenMP/OMPDescriptors.inc
+61-0llvm/include/llvm/Frontend/OpenMP/OMPVersion.h
+28-17llvm/utils/TableGen/Basic/DirectiveEmitter.cpp
+13-13llvm/test/TableGen/directive1.td
+12-12llvm/test/TableGen/directive2.td
+11-9llvm/include/llvm/Frontend/OpenMP/OMP.h
+913-83911 files not shown
+972-88917 files

LLVM/project 788bcc0llvm/lib/Transforms/Vectorize VPlanRecipes.cpp VPlan.cpp, llvm/test/Transforms/LoopVectorize struct-return.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+80-8llvm/test/Transforms/LoopVectorize/struct-return.ll
+12-0llvm/lib/Transforms/Vectorize/VPlan.cpp
+4-3llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+96-113 files

LLVM/project 6db1905clang/lib/AST/ByteCode Pointer.cpp, libc/test/src/math CMakeLists.txt

Merge branch 'main' into users/ziqingluo-90/PR-185840466-2
DeltaFile
+143-144clang/lib/AST/ByteCode/Pointer.cpp
+174-1libc/test/src/math/CMakeLists.txt
+132-41llvm/test/Transforms/PhaseOrdering/AArch64/loopflatten.ll
+54-54lldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py
+94-0llvm/test/Transforms/SLPVectorizer/RISCV/splat-gather-extracts.ll
+83-3lldb/source/Plugins/Process/Utility/RegisterInfos_riscv32.h
+680-243150 files not shown
+1,675-728156 files

LLVM/project a11ea41llvm/lib/Analysis TrainingLogger.cpp TensorSpec.cpp, llvm/lib/CodeGen TwoAddressInstructionPass.cpp

[llvm] Remove unused includes (NFC) (#219782)

Identified by misc-include-cleaner and verified with local builds.
DeltaFile
+0-4llvm/lib/Transforms/Instrumentation/AllocToken.cpp
+0-3llvm/lib/IR/RuntimeLibcalls.cpp
+0-3llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
+0-3llvm/lib/Analysis/TrainingLogger.cpp
+0-3llvm/lib/Analysis/TensorSpec.cpp
+0-2llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+0-1885 files not shown
+0-11391 files

LLVM/project c053daaclang/test/CodeGen attr-sized-by-or-null-for-pointers.c, llvm/lib/Transforms/Scalar ConstraintElimination.cpp

[ConstraintElim] Add NUW for mul/shl with NSW and non-positive ops. (#219663)

If a mul/shl has NSW and both operands are known-non-negative, add NUW.

Note the changes in loopflatten.ll. The IV is now widened by
LoopFlatten, converting it into a form the pass cannot flatten. This is
an underlying issue in the pass

This improves flags in a number of cases, leading to a number of
additional folds:
https://github.com/dtcxzyw/llvm-opt-benchmark-nightly/pull/1098

Alive2 Proof: https://alive2.llvm.org/ce/z/C7QZ4P

PR: https://github.com/llvm/llvm-project/pull/219663
DeltaFile
+132-41llvm/test/Transforms/PhaseOrdering/AArch64/loopflatten.ll
+28-19llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
+12-12llvm/test/Transforms/ConstraintElimination/mul-nsw.ll
+2-2llvm/test/Transforms/ConstraintElimination/materialize-flags.ll
+2-2llvm/test/Transforms/ConstraintElimination/gep-arithmetic-different-types.ll
+2-2clang/test/CodeGen/attr-sized-by-or-null-for-pointers.c
+178-782 files not shown
+181-828 files

LLVM/project 26fc63eclang/include/clang/Basic CommentOptions.h Diagnostic.h, clang/lib/Basic DiagnosticIDs.cpp

Revert "[clang] Don't add documentation comments to the AST if not requested" (#219807)

Reverts llvm/llvm-project#206363 due to huge compile-time regression.
DeltaFile
+89-117clang/lib/Basic/DiagnosticIDs.cpp
+0-38clang/test/Sema/warn-documentation-comment-retention.cpp
+2-31clang/lib/Sema/Sema.cpp
+0-28clang/test/AST/ast-dump-comment-retention.cpp
+0-10clang/include/clang/Basic/Diagnostic.h
+0-8clang/include/clang/Basic/CommentOptions.h
+91-23215 files not shown
+103-28321 files

LLVM/project 2eab249libcxx/test/std/language.support/support.limits/support.limits.general version.version.compile.pass.cpp generator.version.compile.pass.cpp

regen FTM
DeltaFile
+11-2libcxx/test/std/language.support/support.limits/support.limits.general/generator.version.compile.pass.cpp
+7-0libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
+18-22 files

LLVM/project 87a82e6clang/docs ClangFormatStyleOptions.md, clang/include/clang/Basic AttrDocs.td

Merge branch 'main' into users/c8ef/generator
DeltaFile
+13,783-6,856llvm/test/tools/llvm-mca/AArch64/Cortex/C1Nano-sve-instructions.s
+9,921-0llvm/test/CodeGen/AArch64/vector-ldst-align-float.ll
+6,355-3,146llvm/test/tools/llvm-mca/AArch64/Cortex/C1Nano-neon-instructions.s
+4,440-4,281clang/include/clang/Basic/AttrDocs.td
+8,262-0clang/docs/ClangFormatStyleOptions.md
+8,227-0llvm/test/CodeGen/AArch64/vector-ldst-align.ll
+50,988-14,28314,413 files not shown
+842,408-439,08614,419 files

LLVM/project d059c67clang/lib/AST/ByteCode Pointer.cpp, clang/lib/Basic DiagnosticIDs.cpp

Rebase, address comments

Created using spr 1.3.7
DeltaFile
+392-188clang/unittests/ScalableStaticAnalysis/WholeProgramAnalysis/UnsafeBufferReachableAnalysisTest.cpp
+143-144clang/lib/AST/ByteCode/Pointer.cpp
+136-77clang/lib/ScalableStaticAnalysis/Analyses/EntityPointerLevel/EntityPointerLevel.cpp
+107-79clang/lib/Basic/DiagnosticIDs.cpp
+183-0clang/unittests/ScalableStaticAnalysis/Analyses/EntityPointerLevel/EntityPointerLevelTest.cpp
+174-1libc/test/src/math/CMakeLists.txt
+1,135-489138 files not shown
+3,928-1,509144 files