LLVM/project c4208b2 — llvm/lib/Analysis ScalarEvolution.cpp, llvm/test/Transforms/IndVarSimplify loop-invariant-predicate-samesign.ll

[SCEV] Drop samesign in getLoopInvariantPredicate

SCEV's getLoopInvariantPredicate tries to replace a comparison of an IV
against a loop-invariant value with the comparison value on loop entry.

For that it tries to prove that the comparison is:
 - (A) monotonic: i.e. if c_i is true, then c_{i+1} is true,
 - (B) guards the backedge: the backedge is taken only if c_i is true.
Then each c_i may be replaced with c_0.

It works for the icmp instruction without the samesign flag.

With the samesign flag, however, the comparison is poison when its
operands have different signs.

To prove the backedge guard (B), we may rely on picking that poison as
true, while proving the monotonicity (A) may need the same poison
to be picked as false.


    [27 lines not shown]
DeltaFile
+10-0llvm/lib/Analysis/ScalarEvolution.cpp
+4-3llvm/test/Transforms/IndVarSimplify/loop-invariant-predicate-samesign.ll
+14-32 files

LLVM/project bd26229 — mlir/include/mlir/Dialect/X86 Transforms.h, mlir/include/mlir/Dialect/X86/TransformOps X86TransformOps.td

[mlir][X86] Fold VNNI operand unpacking into contractions (#232800)

Matmul loops often transpose and flatten a VNNI-packed RHS before
`vector.contract`, hiding the packed lanes from the X86 AMX lowering
patterns and preventing the contraction from being lowered to an AMX dot
product (nanokernels).
- Adding a contract-loop preparation pattern for bf16 and i8 matmul
loops where the RHS is unpacked using a transpose and shape cast.
- Reading the RHS in packed VNNI layout and contract over the K and
VNNI-lane dimensions, preserving fastmath attributes.
- Supporting already-packed and flat RHS reads, leading unit dimensions,
and dynamically sized innermost dimensions.
- Rejecting layouts that cannot be packed safely.

In follow-up PRs we could add more normalization patterns:
- Accepting other/similar pattern expressing the same (like generated by
triton-cpu)
- CanonicalizeLoopIV: Fold exact round-downs and safe casts so reads can
use the loop IV directly.

    [3 lines not shown]
DeltaFile
+377-0mlir/test/Dialect/X86/vector-contract-prepare-loops.mlir
+321-0mlir/lib/Dialect/X86/Transforms/PrepareVectorContractLoops.cpp
+94-0mlir/test/Integration/Dialect/Vector/CPU/X86/prepare-contract-loops.mlir
+11-0mlir/lib/Dialect/X86/TransformOps/X86TransformOps.cpp
+4-6mlir/include/mlir/Dialect/X86/Transforms.h
+10-0mlir/include/mlir/Dialect/X86/TransformOps/X86TransformOps.td
+817-62 files not shown
+824-68 files

LLVM/project e71b457 — llvm/test/Transforms/IndVarSimplify loop-invariant-predicate-samesign.ll

[IndVarSimplify][NFC] Add tests for loop-invariant samesign compares

Add tests for replacing a samesign compare of an IV with a
loop-invariant value by its value on loop entry.

Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+108-0llvm/test/Transforms/IndVarSimplify/loop-invariant-predicate-samesign.ll
+108-01 files

LLVM/project 53f0b2e — utils/bazel/llvm-project-overlay/mlir/test BUILD.bazel

[Bazel] Fixes 98ab0ff (#236080)

This fixes 98ab0fff9f7571788bf94fbd353dc17ca08cd2f6 (#236072).

Buildkite error link:
https://buildkite.com/llvm-project/upstream-bazel/builds?commit=98ab0fff9f7571788bf94fbd353dc17ca08cd2f6

Co-authored-by: Google Bazel Bot <google-bazel-bot at google.com>
DeltaFile
+1-0utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
+1-01 files

LLVM/project 9e916d9 — llvm/include/llvm/Frontend/Directive Version.h, llvm/include/llvm/Frontend/OpenMP OMPVersion.h

[OpenMP] Unify Version with directive::VersionRange

The limits of VersionRange will now be represented as Versions,
not int values.
DeltaFile
+74-0llvm/include/llvm/Frontend/Directive/Version.h
+25-23llvm/unittests/Frontend/OpenACCTest.cpp
+3-44llvm/include/llvm/Frontend/OpenMP/OMPVersion.h
+18-21llvm/utils/TableGen/Basic/DirectiveEmitter.cpp
+14-12llvm/test/TableGen/directive1.td
+13-11llvm/test/TableGen/directive2.td
+147-1118 files not shown
+169-15314 files

LLVM/project ff7c6f2 — llvm/lib/Target/AArch64 AArch64InstrFormats.td, llvm/lib/Target/AArch64/AsmParser AArch64AsmParser.cpp

[AArch64][llvm] Fix incorrect diagnostic (index/immediate in simm9) (#229563)

Improve the error message in the simm9 diagnostics and use the
correct word `immediate` instead of `index`. This was noticed when
creating the `CFLT` instructions for Armv9.8-A, but would have
caused a lot of unrelated churn if merged as part of that change.

Co-authored-by: Martin Wehking <martin.wehking at arm.com>
DeltaFile
+151-151llvm/test/MC/AArch64/basic-a64-diagnostics.s
+113-106llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+53-53llvm/test/MC/AArch64/armv8.5a-mte-error.s
+40-39llvm/lib/Target/AArch64/AArch64InstrFormats.td
+39-39llvm/test/MC/AArch64/armv8.4a-ldst-error.s
+16-16llvm/test/MC/AArch64/SVE/st1h-diagnostics.s
+412-404119 files not shown
+922-914125 files

LLVM/project c6a41f0 — clang/lib/CIR/CodeGen CIRGenBuiltinAMDGPU.cpp

[NFC][CIR][AMDGPU] Build fence scope triple from enums (#235907)

Drop the legacy amdgcn-amd-amdhsa string, matching how OffloadArch and
SPIR targets build the AMDGPU triple
DeltaFile
+4-2clang/lib/CIR/CodeGen/CIRGenBuiltinAMDGPU.cpp
+4-21 files

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

[OpenMP] Switch the underlying type of llvm::omp::Version to int

It was unsigned before. The goal is to unify Version and VersionRange,
and VersionRange stores versions as int.
DeltaFile
+1-1llvm/include/llvm/Frontend/OpenMP/OMPVersion.h
+1-1flang/lib/Parser/openmp-utils.cpp
+1-1flang/include/flang/Parser/openmp-utils.h
+3-33 files

LLVM/project a400fc3 — mlir/lib/Support RawOstreamExtras.cpp

Replace thread_local with LLVM_THREAD_LOCAL (#235889)

This patch replaces thread_local with LLVM_THREAD_LOCAL to fix a build
error on z/OS
DeltaFile
+1-1mlir/lib/Support/RawOstreamExtras.cpp
+1-11 files

LLVM/project 71d751f — clang/test/CIR/CodeGenCUDA global-addrspace-cast.cu vtable-host-device.cu, clang/test/CIR/CodeGenHIP lambda-reference-var.hip amdgpu-workgroup-size.hip

[NFC][CIR][AMDGPU] Use amdgpu-amd-amdhsa triple in CIR tests (#235901)

Use new AMDGPU triples everywhere it is applicable
DeltaFile
+6-6clang/test/CIR/CodeGenHIP/amdgpu-workgroup-size.hip
+3-3clang/test/CIR/Lowering/unlowered-address-spaces.cir
+3-3clang/test/CIR/CodeGenOpenCL/kernel-calling-conv.cl
+3-3clang/test/CIR/CodeGenHIP/lambda-reference-var.hip
+3-3clang/test/CIR/CodeGenCUDA/vtable-host-device.cu
+2-2clang/test/CIR/CodeGenCUDA/global-addrspace-cast.cu
+20-207 files not shown
+30-3013 files

LLVM/project 258281f — clang/lib/CIR/CodeGen CIRGenAtomic.cpp, clang/test/CIR/CodeGenHIP amdgcnspirv-atomic-scope.hip

[CIR][AMDGPU][SPIR-V] Emit AMDGPU atomic memory metadata for spirv64-amd (#236037)

Match classic codegen so AMD SPIR-V atomic RMW ops do not lower to CAS
loops
DeltaFile
+25-15clang/test/CIR/CodeGenHIP/amdgcnspirv-atomic-scope.hip
+9-5clang/lib/CIR/CodeGen/CIRGenAtomic.cpp
+34-202 files

LLVM/project 334a11f — libc/src/__support/CPP CMakeLists.txt unique_ptr.h, libc/test/src/__support/CPP CMakeLists.txt unique_ptr_test.cpp

Revert "Revert "[libc] Assert non-nullness in cpp::unique_ptr dereference ope…"

This reverts commit 8ac612dcb3841653c9221f5f3f9fe20c2de450ed.
DeltaFile
+24-0libc/test/src/__support/CPP/unique_ptr_test.cpp
+10-2libc/src/__support/CPP/unique_ptr.h
+1-0libc/test/src/__support/CPP/CMakeLists.txt
+1-0libc/src/__support/CPP/CMakeLists.txt
+36-24 files

LLVM/project 98ab0ff — mlir/test/lib/Dialect/Bufferization TestOneShotModuleBufferize.cpp

[mlir][test] Add missing TypeSwitch.h include in TestOneShotModuleBufferize.cpp (#236072)

Fixes errors like:
<...>/TestOneShotModuleBufferize.cpp(37,7): error: implicit
instantiation of undefined template
'llvm::TypeSwitch<mlir::bufferization::BufferLikeType,
mlir::MemRefLayoutAttrInterface>'
   37 |       llvm::TypeSwitch<bufferization::BufferLikeType,
      |       ^
<...>/LLVM.h(79,7): note: template is declared here
   79 | class TypeSwitch;
      |       ^
DeltaFile
+2-0mlir/test/lib/Dialect/Bufferization/TestOneShotModuleBufferize.cpp
+2-01 files

LLVM/project a90507f — mlir/unittests/ExecutionEngine WindowsArm64.cpp

[mlir][test] Initialise targets in WindowsArm64.cpp (#236074)

Fixes #229719 / f330666ac78564db6651c81cd1d4658ff27758a8.

Without initializing targets the test fails:
https://lab.llvm.org/buildbot/#/builders/207/builds/23792


C:\Users\tcwg\llvm-worker\flang-arm64-windows-msvc\llvm-project\mlir\unittests\ExecutionEngine\WindowsArm64.cpp:144
Failed
Unable to find target for this triple (no targets are registered)

Relates to #232235.
DeltaFile
+8-0mlir/unittests/ExecutionEngine/WindowsArm64.cpp
+8-01 files

LLVM/project e7f2fe5 — flang/lib/Frontend CompilerInvocation.cpp, flang/lib/Parser openmp-utils.cpp

[OpenMP] Replace cast operator with member function

Replace the explicit cast operator to the underlying type with a
member function "value()" that returns the underlying value.
DeltaFile
+8-1llvm/utils/TableGen/Basic/DirectiveEmitter.cpp
+2-3llvm/unittests/Frontend/OpenMPDirectiveNameParserTest.cpp
+2-3llvm/include/llvm/Frontend/OpenMP/OMPVersion.h
+2-3flang/lib/Semantics/openmp-utils.cpp
+2-2flang/lib/Frontend/CompilerInvocation.cpp
+1-2flang/lib/Parser/openmp-utils.cpp
+17-144 files not shown
+21-2010 files

LLVM/project 735f289 — flang/test/Semantics/OpenMP metadirective-declare-reduction-v52.f90 metadirective-declare-reduction-v51.f90

Add checks for DECLARE_REDUCTION in DEFAULT/OTHERWISE
DeltaFile
+14-0flang/test/Semantics/OpenMP/metadirective-declare-reduction-v52.f90
+14-0flang/test/Semantics/OpenMP/metadirective-declare-reduction-v51.f90
+28-02 files

LLVM/project 4797c19 — llvm/lib/Target/AArch64 AArch64SVEInstrInfo.td, llvm/test/CodeGen/AArch64 sve-fixed-length-nontemporal-masked-ldst.ll sve-nontemporal-masked-ldst.ll

[AArch64][DAG] Add ISel for SVE floating-point non-temporal loads and stores. (#232171)

loads/stores with non-temporal metadata for types 1: float point
scalable length vector or 2: float point fixed length wider vectors with
sve-vector-length bigger than 128 get error:
```
LLVM ERROR: Cannot select: t7: nxv2f32,ch = masked_load<(non-temporal load unknown-size from %ir.a, align 1)> t0, t2, poison:i64, t4, poison:nxv2f32
``` 

This patch fixes above error:
1: if the type has related non-temporal load/store instructions, select
the instructions
2: if the type has no non-temporal load/store instructions, select the
normal load/store instread of crash
DeltaFile
+216-0llvm/test/CodeGen/AArch64/sve-nontemporal-masked-ldst.ll
+41-0llvm/test/CodeGen/AArch64/sve-fixed-length-nontemporal-masked-ldst.ll
+31-0llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
+288-03 files

LLVM/project c3604df — clang/lib/Basic IdentifierTable.cpp, llvm/include/llvm/ADT Enum.h

[spr] initial version

Created using spr 2.0.0-beta.2
DeltaFile
+7-3clang/lib/Basic/IdentifierTable.cpp
+8-0llvm/include/llvm/ADT/Enum.h
+15-32 files

LLVM/project 9b4025f — llvm/include/llvm/CodeGen BasicTTIImpl.h, llvm/lib/Target/AArch64 AArch64TargetTransformInfo.cpp

[AArch64][X86][CostModel] Add cost model for pdep/pext instructions (#207657)

Cost model of pext and pdep intrinsics added in
https://github.com/llvm/llvm-project/pull/200570

Fixes #226919
DeltaFile
+123-0llvm/test/Analysis/CostModel/AArch64/pdep-pext.ll
+54-43llvm/test/Analysis/CostModel/X86/pext.ll
+54-43llvm/test/Analysis/CostModel/X86/pdep.ll
+41-2llvm/include/llvm/CodeGen/BasicTTIImpl.h
+16-16llvm/test/Analysis/CostModel/X86/intrinsic-cost-kinds.ll
+17-0llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+305-1042 files not shown
+314-1088 files

LLVM/project 2318c15 — mlir/include/mlir/Dialect/Vector/IR Vector.td, mlir/lib/Dialect/Tensor/IR TensorOps.cpp

[mlir][vector][tensor] Scalarize select conditions from broadcast and splat (#235593)

## Summary

Canonicalize `arith.select` with a mask produced by `vector.broadcast`
of a scalar `i1`, or by `tensor.splat`, to a select on the scalar
condition.

```python
%mask = vector.broadcast %p : i1 to vector<4xi1>
%result = arith.select %mask, %a, %b : vector<4xi1>, vector<4xi32>
```

becomes:

```python
%result = arith.select %p, %a, %b : vector<4xi32>
```


    [23 lines not shown]
DeltaFile
+98-0mlir/test/Dialect/Vector/canonicalize.mlir
+97-0mlir/test/Dialect/Tensor/canonicalize.mlir
+27-0mlir/lib/Dialect/Vector/IR/VectorOps.cpp
+18-1mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
+1-0mlir/include/mlir/Dialect/Vector/IR/Vector.td
+241-15 files

LLVM/project 9d56d99 — flang/lib/Semantics canonicalize-omp.cpp, flang/test/Semantics/OpenMP metadirective-common.f90 metadirective-declare-reduction-v52.f90

Treat ERROR AT(COMPILATION) as neutral
DeltaFile
+29-9flang/lib/Semantics/canonicalize-omp.cpp
+20-0flang/test/Semantics/OpenMP/metadirective-declare-reduction-v52.f90
+20-0flang/test/Semantics/OpenMP/metadirective-declare-reduction-v51.f90
+7-0flang/test/Semantics/OpenMP/metadirective-common.f90
+76-94 files

LLVM/project 9770afe — flang/lib/Semantics canonicalize-omp.cpp, flang/test/Semantics/OpenMP metadirective-declare-reduction-v52.f90 metadirective-declare-reduction-v51.f90

Missing AT is equivalent to AT(COMPILATION)
DeltaFile
+8-0flang/test/Semantics/OpenMP/metadirective-declare-reduction-v52.f90
+8-0flang/test/Semantics/OpenMP/metadirective-declare-reduction-v51.f90
+1-0flang/lib/Semantics/canonicalize-omp.cpp
+17-03 files

LLVM/project 0cf86c3 — flang/lib/Semantics check-omp-variant.cpp, flang/test/Semantics/OpenMP metadirective-declare-reduction.f90 metadirective-declare-reduction-v51.f90

Address review comments
DeltaFile
+0-15flang/test/Semantics/OpenMP/metadirective-declare-reduction.f90
+15-0flang/test/Semantics/OpenMP/metadirective-declare-reduction-v51.f90
+15-0flang/test/Semantics/OpenMP/metadirective-declare-reduction-v52.f90
+1-1flang/lib/Semantics/check-omp-variant.cpp
+31-164 files

LLVM/project 5a93535 — flang/test/Semantics/OpenMP metadirective-declare-reduction-v52.f90 metadirective-declare-reduction-v51.f90

Add metadirective nothing per reviewer request
DeltaFile
+1-0flang/test/Semantics/OpenMP/metadirective-declare-reduction-v52.f90
+1-0flang/test/Semantics/OpenMP/metadirective-declare-reduction-v51.f90
+2-02 files

LLVM/project 4855a0d — flang/lib/Semantics check-omp-variant.cpp openmp-utils.cpp

format
DeltaFile
+2-2flang/lib/Semantics/openmp-utils.cpp
+0-1flang/lib/Semantics/check-omp-variant.cpp
+2-32 files

LLVM/project 2f1b735 — flang/lib/Semantics check-omp-variant.cpp

format
DeltaFile
+4-2flang/lib/Semantics/check-omp-variant.cpp
+4-21 files

LLVM/project b6d087d — flang/include/flang/Semantics openmp-utils.h, flang/lib/Semantics check-omp-variant.cpp openmp-utils.cpp

Verify selectorless clauses as well
DeltaFile
+35-20flang/lib/Semantics/openmp-utils.cpp
+9-15flang/lib/Semantics/check-omp-variant.cpp
+8-2flang/test/Semantics/OpenMP/metadirective-declare-reduction.f90
+5-0flang/include/flang/Semantics/openmp-utils.h
+57-374 files

LLVM/project 24854d1 — flang/lib/Semantics openmp-utils.cpp

Add missing include
DeltaFile
+1-0flang/lib/Semantics/openmp-utils.cpp
+1-01 files

LLVM/project 2ed62ad — flang/lib/Semantics check-omp-variant.cpp

Limit checks to current METADIRECTIVE
DeltaFile
+17-7flang/lib/Semantics/check-omp-variant.cpp
+17-71 files

LLVM/project 388c099 — flang/lib/Semantics check-omp-structure.h check-omp-structure.cpp, flang/test/Semantics/OpenMP metadirective-declare-reduction.f90

Verify DECLARE_REDUCTION in METADIRECTIVE
DeltaFile
+13-0flang/lib/Semantics/check-omp-variant.cpp
+7-2flang/lib/Semantics/check-omp-structure.cpp
+9-0flang/test/Semantics/OpenMP/metadirective-declare-reduction.f90
+1-0flang/lib/Semantics/check-omp-structure.h
+30-24 files