LLVM/project 299c65b — llvm/lib/Transforms/Utils SimplifyCFG.cpp, llvm/test/Transforms/SimplifyCFG/X86 switch-to-lookup-masked-profile.ll

[SimplifyCFG] Mark branch weights unknown in masked switch to lookup (#233321)

We cannot infer the branch weights because this transformation splits
the default case into two (values fully out of range, and holes inside
the range), which we cannot infer without additional value profiling.
DeltaFile
+48-0llvm/test/Transforms/SimplifyCFG/X86/switch-to-lookup-masked-profile.ll
+13-2llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+61-22 files

LLVM/project 2eeab11 — mlir/lib/Dialect/Arith/Transforms IntRangeOptimizations.cpp, mlir/test/Dialect/Arith int-range-narrowing.mlir

[mlir][arith] Drop invalid overflow flags when narrowing

Preserve nsw only when narrowing preserves signed operand and result
values, and nuw only when it preserves unsigned values. Flags proven
at the original width may otherwise introduce poison after narrowing.

Add concrete regression cases for addi, subi, muli, and shli, covering
both overflow flags and retention of valid flags.
DeltaFile
+162-0mlir/test/Dialect/Arith/int-range-narrowing.mlir
+13-0mlir/lib/Dialect/Arith/Transforms/IntRangeOptimizations.cpp
+175-02 files

LLVM/project 6f050bd — mlir/lib/Dialect/Arith/Transforms IntRangeOptimizations.cpp, mlir/test/Dialect/Arith int-range-narrowing.mlir

[mlir][arith] Preserve unsigned values when narrowing operations

Require unsigned representability for divui, ceildivui, remui, and shrui.
A signed range fitting the narrower type does not preserve the unsigned
operand values, even when the result fits.

Add concrete counterexamples and coverage for safe narrowing of
zero-extended and proven nonnegative operands.
DeltaFile
+95-0mlir/test/Dialect/Arith/int-range-narrowing.mlir
+4-3mlir/lib/Dialect/Arith/Transforms/IntRangeOptimizations.cpp
+99-32 files

LLVM/project 027f799 — llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/lib/Transforms/Vectorize/SLPVectorizer SLPMemoryUtils.cpp

[SLP] Handle REVEC when costing expanded compress mask

With REVEC the scalars are vectors. The masked-load-compress shuffle that is
emitted uses the compress mask expanded to the elements of those vectors
(transformScalarShuffleIndiciesToVector), but the cost was computed with the
unexpanded per-vector mask, so a shuffle such as <24 x i8> -> <16 x i8> was
costed as a <2 x i8> shuffle. This made the compress sequence looked cheaper
than it is.

Assisted-By: Claude Sonnet 5.5
DeltaFile
+13-9llvm/test/Transforms/SLPVectorizer/RISCV/revec-compress-mask-cost.ll
+7-2llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+6-2llvm/lib/Transforms/Vectorize/SLPVectorizer/SLPMemoryUtils.cpp
+26-133 files

LLVM/project 8260e83 — flang/lib/Semantics check-omp-atomic.cpp check-omp-structure.h, flang/test/Semantics/OpenMP declare-target02.f90 flush02.f90

[flang][OpenMP] Switch clause verification to descriptor-based

Delete all the scattered pieces of clause verification that are now
replaced by the unified handling.
DeltaFile
+57-273flang/lib/Semantics/check-omp-structure.cpp
+300-0flang/lib/Semantics/check-omp-syntax.cpp
+22-10flang/lib/Semantics/check-omp-structure.h
+0-31flang/lib/Semantics/check-omp-atomic.cpp
+8-8flang/test/Semantics/OpenMP/flush02.f90
+15-0flang/test/Semantics/OpenMP/declare-target02.f90
+402-32237 files not shown
+517-38443 files

LLVM/project 31a65fa — flang/test/Semantics/OpenMP to-clause-v45.f90 from-clause-v45.f90

Update tests
DeltaFile
+1-1flang/test/Semantics/OpenMP/to-clause-v45.f90
+1-1flang/test/Semantics/OpenMP/from-clause-v45.f90
+2-22 files

LLVM/project 6f485b6 — flang/lib/Semantics check-omp-syntax.cpp, flang/test/Semantics/OpenMP uses-allocators-version51.f90 uses-allocators-version50.f90

[flang][OpenMP] Improve diagnostics about modifier properties

Use OpenMPDeprecated and OpenMPFuture warning categories for modifier
diagnostics as well, analogously to how they are used for clauses.
DeltaFile
+67-31flang/lib/Semantics/check-omp-syntax.cpp
+4-4flang/test/Semantics/OpenMP/map-modifiers-v60.f90
+3-3flang/test/Semantics/OpenMP/uses-allocators-version50.f90
+3-3flang/test/Semantics/OpenMP/to-clause-v45.f90
+3-3flang/test/Semantics/OpenMP/from-clause-v45.f90
+2-2flang/test/Semantics/OpenMP/uses-allocators-version51.f90
+82-466 files not shown
+89-5312 files

LLVM/project 816ecf6 — flang/test/Semantics/OpenMP to-clause-v45.f90 from-clause-v45.f90

Update tests
DeltaFile
+1-1flang/test/Semantics/OpenMP/to-clause-v45.f90
+1-1flang/test/Semantics/OpenMP/from-clause-v45.f90
+2-22 files

LLVM/project 0595779 — flang/include/flang/Parser openmp-utils.h, flang/lib/Semantics check-omp-structure.h check-omp-syntax.cpp

[flang][OpenMP] Account for using different versions for modifier checks (#229525)

When a modifier from a past/future version is accepted, use its
properties
from the nearest version in which it is allowed.
DeltaFile
+118-75flang/lib/Semantics/check-omp-syntax.cpp
+7-0flang/test/Semantics/OpenMP/to-clause-v45.f90
+7-0flang/test/Semantics/OpenMP/from-clause-v45.f90
+3-1flang/include/flang/Parser/openmp-utils.h
+2-1llvm/include/llvm/Frontend/Directive/Spelling.h
+1-0flang/lib/Semantics/check-omp-structure.h
+138-776 files

LLVM/project 608fabb — flang/include/flang/Parser openmp-utils.h, flang/lib/Parser openmp-utils.cpp

[flang][OpenMP] Create generic interfaces for "container" entities (#229524)

In short, clauses are containers of modifiers, and directives are
containers of clauses. With the abstractions in place, clauses and
modifiers look almost the same from the point of view of syntactic
properties.

Use these functions to implement generic GetAllowedElements and
GetElementVersionRange functions.
DeltaFile
+17-55flang/lib/Semantics/check-omp-syntax.cpp
+56-0flang/include/flang/Parser/openmp-utils.h
+31-0flang/lib/Parser/openmp-utils.cpp
+104-553 files

LLVM/project aecafbb — llvm/include/llvm/Support SourceMgrDiagnosticVerifier.h, llvm/lib/Support SourceMgrDiagnosticVerifier.cpp

[nspr] initial commit
DeltaFile
+45-14llvm/lib/Support/SourceMgrDiagnosticVerifier.cpp
+20-0llvm/unittests/Support/SourceMgrDiagnosticVerifierTest.cpp
+15-4llvm/include/llvm/Support/SourceMgrDiagnosticVerifier.h
+80-183 files

LLVM/project a5a3688 — llvm/include/llvm/Support SourceMgrDiagnosticVerifier.h, llvm/lib/Support SourceMgrDiagnosticVerifier.cpp

[nspr] initial commit
DeltaFile
+123-0llvm/unittests/Support/SourceMgrDiagnosticVerifierTest.cpp
+67-51llvm/lib/Support/SourceMgrDiagnosticVerifier.cpp
+49-46llvm/include/llvm/Support/SourceMgrDiagnosticVerifier.h
+12-17mlir/lib/IR/Diagnostics.cpp
+1-0llvm/utils/gn/secondary/llvm/unittests/Support/BUILD.gn
+1-0llvm/unittests/Support/CMakeLists.txt
+253-1146 files

LLVM/project ba7e0ef — llvm/include/llvm/Support SourceMgrDiagnosticVerifier.h

Declare MatchResult before ExpectedDiag so that a later commit does not have to move it (no functional change).
DeltaFile
+16-16llvm/include/llvm/Support/SourceMgrDiagnosticVerifier.h
+16-161 files

LLVM/project 1d80b2c — llvm/include/llvm/Support SourceMgrDiagnosticVerifier.h, llvm/lib/Support SourceMgrDiagnosticVerifier.cpp

[nspr] initial commit
DeltaFile
+125-125llvm/lib/Support/SourceMgrDiagnosticVerifier.cpp
+37-37llvm/include/llvm/Support/SourceMgrDiagnosticVerifier.h
+162-1622 files

LLVM/project 5fda771 — llvm/lib/IR Verifier.cpp, llvm/test/Verifier hot-cold-incompatible.ll

[IR] Reject IR functions that have hot and cold attributes (#233298)

These are mutually exclusive and clang already enforces this. We should
just reject this in the verifier so that passes don't have to think
about precedence of these two attributes.
DeltaFile
+8-0llvm/test/Verifier/hot-cold-incompatible.ll
+4-0llvm/lib/IR/Verifier.cpp
+12-02 files

LLVM/project 04def51 — llvm/lib/Analysis LoopAccessAnalysis.cpp, llvm/test/Analysis/LoopAccessAnalysis calls-with-operand-bundles.ll

[LAA] Reject calls with operand bundles that may access memory. (#233304)

Calls to vectorizable intrinsics and vector-variant calls skipped the
memory check, so bundles that may access memory (e.g. deopt) were
ignored. In LV this hoisted, removed or mis-widened such calls.

Reject bundles conservatively for now to fix miscompiles. We can make
this more fine-grained if needed in practice.
DeltaFile
+131-95llvm/test/Transforms/LoopVectorize/operand-bundles.ll
+22-27llvm/test/Transforms/LoopVectorize/X86/funclet.ll
+10-18llvm/test/Transforms/LoopVectorize/widen-intrinsic.ll
+9-0llvm/lib/Analysis/LoopAccessAnalysis.cpp
+2-2llvm/test/Analysis/LoopAccessAnalysis/calls-with-operand-bundles.ll
+174-1425 files

LLVM/project 64dfab6 — llvm/docs Vectorizers.md

[DOCS][SLP][NFC]Fix non-vectoriable example in docs, NFC

Fixes #230067

Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/233315
DeltaFile
+1-1llvm/docs/Vectorizers.md
+1-11 files

LLVM/project 1886659 — llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 buildvector-cross-product.ll

[SLP]Allow non-power-of-2 VF for partial register buildvectors

The buildvector, not filling the whole registers (e.g. <3 x float>),
was vectorized as the power-of-2 part plus the scalar remainder. The
type is widened to the full registers anyway, so vectorize it as a
whole.

Partially fixes #56332

Assisted-by: Cursor

Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/233314
DeltaFile
+16-33llvm/test/Transforms/SLPVectorizer/X86/buildvector-cross-product.ll
+16-8llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+32-412 files

LLVM/project bab8bff — llvm/test/Transforms/SLPVectorizer/X86 buildvector-cross-product.ll

[SLP][NFC]Add a test for cross product, NFC



Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/233311
DeltaFile
+180-0llvm/test/Transforms/SLPVectorizer/X86/buildvector-cross-product.ll
+180-01 files

LLVM/project 1b51a4c — llvm/include/llvm/ProfileData MemProfRadixTree.h, llvm/unittests/Transforms/Instrumentation MemProfUseTest.cpp

[memprof] Clean up remnants of MemProf format Version 2 (NFC) (#233288)

This patch cleans up two remnants left after the removal of MemProf
format Version 2 in #229262:

- FrameIdConverter and CallStackIdConverter in MemProfRadixTree.h no
  longer need detail::DerefIterator.  Note that detail::DerefIterator
  was needed only to abstract iterator dereferencing across MapVector
  and OnDiskIterableChainedHashTable, the latter of which was used
  only in Version 2.

- MemProfUseTest.cpp still named its test helper makeRecordV2 even
  though the test uses Version 3.  This patch renames it to
  makeRecord, matching InstrProfTest.cpp.

Assisted-by: Antigravity
DeltaFile
+2-16llvm/include/llvm/ProfileData/MemProfRadixTree.h
+4-4llvm/unittests/Transforms/Instrumentation/MemProfUseTest.cpp
+6-202 files

LLVM/project 738476f — llvm/lib/Transforms/IPO MemProfContextDisambiguation.cpp

[MemProf] Fix compile-time blowup in connectNewNode (NFC) (#233240)

connectNewNode had efficiency related support to shrink the remaining
set of context ids to move to the new edges. However, when recursive
callsites are allowed (the default), this required an expensive pre-pass
that overwhelmed any efficiency improvement.

It first scanned every context id on every edge of the original node to
find the recursive ids (those on multiple edges), and then used them to
decide which ids to remove from its copy of the remaining context id
set as edges were processed. Each call to connectNewNode rescans all ids
on that node's edges, even though the set of ids being moved is
typically small. On a large ThinLTO application this pre-pass dominated
the thin link, which took over 43 minutes. With
-memprof-allow-recursive-callsites=false it took about 4 minutes.

The updating of the remaining id set is not needed for correctness. An
id on only one edge has already been moved off that edge once matched.
An id on multiple edges is recursive and must be matched on every edge.

    [15 lines not shown]
DeltaFile
+3-36llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
+3-361 files

LLVM/project 8812d41 — llvm/include/llvm/Support SourceMgrDiagnosticVerifier.h, llvm/lib/Support SourceMgrDiagnosticVerifier.cpp

[nspr] initial commit
DeltaFile
+12-6llvm/lib/Support/SourceMgrDiagnosticVerifier.cpp
+17-0llvm/unittests/Support/SourceMgrDiagnosticVerifierTest.cpp
+12-0llvm/test/tools/llvm-mc/verify/basic.s
+2-2llvm/include/llvm/Support/SourceMgrDiagnosticVerifier.h
+43-84 files

LLVM/project 3e98d17 — llvm/lib/Support SourceMgrDiagnosticVerifier.cpp, llvm/unittests/Support SourceMgrDiagnosticVerifierTest.cpp

[nspr] initial commit
DeltaFile
+33-0llvm/unittests/Support/SourceMgrDiagnosticVerifierTest.cpp
+14-6llvm/lib/Support/SourceMgrDiagnosticVerifier.cpp
+47-62 files

LLVM/project afb08db — llvm/lib/Support SourceMgrDiagnosticVerifier.cpp, llvm/unittests/Support SourceMgrDiagnosticVerifierTest.cpp

[nspr] initial commit
DeltaFile
+33-0llvm/unittests/Support/SourceMgrDiagnosticVerifierTest.cpp
+14-6llvm/lib/Support/SourceMgrDiagnosticVerifier.cpp
+47-62 files

LLVM/project d2cdfed — llvm/lib/Support SourceMgrDiagnosticVerifier.cpp, llvm/unittests/Support SourceMgrDiagnosticVerifierTest.cpp

[nspr] initial commit
DeltaFile
+11-0llvm/unittests/Support/SourceMgrDiagnosticVerifierTest.cpp
+2-2llvm/lib/Support/SourceMgrDiagnosticVerifier.cpp
+13-22 files

LLVM/project bc75553 — llvm/lib/Support SourceMgrDiagnosticVerifier.cpp, llvm/unittests/Support SourceMgrDiagnosticVerifierTest.cpp

[nspr] initial commit
DeltaFile
+11-0llvm/unittests/Support/SourceMgrDiagnosticVerifierTest.cpp
+2-2llvm/lib/Support/SourceMgrDiagnosticVerifier.cpp
+13-22 files

LLVM/project b5fbb49 — llvm/include/llvm/Support SourceMgrDiagnosticVerifier.h, llvm/lib/Support SourceMgrDiagnosticVerifier.cpp

[nspr] initial commit
DeltaFile
+12-6llvm/lib/Support/SourceMgrDiagnosticVerifier.cpp
+17-0llvm/unittests/Support/SourceMgrDiagnosticVerifierTest.cpp
+12-0llvm/test/tools/llvm-mc/verify/basic.s
+2-2llvm/include/llvm/Support/SourceMgrDiagnosticVerifier.h
+43-84 files

LLVM/project 8bbc69a — llvm/lib/Support SourceMgrDiagnosticVerifier.cpp, llvm/test/tools/llvm-mc/verify basic.s

[nspr] initial commit
DeltaFile
+36-0llvm/unittests/Support/SourceMgrDiagnosticVerifierTest.cpp
+21-4llvm/lib/Support/SourceMgrDiagnosticVerifier.cpp
+10-1llvm/test/tools/llvm-mc/verify/basic.s
+67-53 files

LLVM/project cde8b10 — llvm/test/MC/RISCV priv-invalid.s

[nspr] update
DeltaFile
+1-1llvm/test/MC/RISCV/priv-invalid.s
+1-11 files

LLVM/project 4e311b6 — llvm/include/llvm/Support SourceMgrDiagnosticVerifier.h, llvm/lib/Support SourceMgrDiagnosticVerifier.cpp

[nspr] initial commit
DeltaFile
+13-11llvm/lib/Support/SourceMgrDiagnosticVerifier.cpp
+17-0llvm/unittests/Support/SourceMgrDiagnosticVerifierTest.cpp
+6-6llvm/include/llvm/Support/SourceMgrDiagnosticVerifier.h
+36-173 files