LLVM/project 1949785llvm/test/CodeGen/X86 vector-reduce-smin.ll vector-reduce-smax.ll

Merge branch 'main' into users/bassiounix/refactor/constexpr-math
DeltaFile
+2,928-1,388llvm/test/CodeGen/X86/vector-reduce-smin.ll
+2,924-1,389llvm/test/CodeGen/X86/vector-reduce-smax.ll
+2,677-1,279llvm/test/CodeGen/X86/vector-reduce-umax.ll
+2,628-1,271llvm/test/CodeGen/X86/vector-reduce-umin.ll
+1,491-563llvm/test/CodeGen/X86/vector-reduce-or-cmp.ll
+1,334-623llvm/test/CodeGen/X86/vector-reduce-and-bool.ll
+13,982-6,513286 files not shown
+25,300-13,462292 files

LLVM/project afb0a93libc/src/__support/math canonicalizef.h canonicalizef128.h, libc/test/shared shared_math_constexpr_test.cpp CMakeLists.txt

[libc][math] Qualify canonicalize functions to constexpr (#195630)

Signed-off-by: udaykiriti <udaykiriti624 at gmail.com>
DeltaFile
+30-0libc/test/shared/shared_math_constexpr_test.cpp
+6-0libc/test/shared/CMakeLists.txt
+1-1libc/src/__support/math/canonicalizef.h
+1-1libc/src/__support/math/canonicalizef128.h
+1-1libc/src/__support/math/canonicalizef16.h
+1-1libc/src/__support/math/canonicalizel.h
+40-42 files not shown
+42-68 files

LLVM/project 5f60066.github/workflows release-tasks.yml

Revert "workflows/release-tasks: Use app generated token for publishing lit releases" (#195632)

Reverts llvm/llvm-project#195312

Causes:

> (Line: 99, Col: 5): 'environment' is already defined
DeltaFile
+1-12.github/workflows/release-tasks.yml
+1-121 files

LLVM/project e69e7f4llvm/test/CodeGen/X86 vector-reduce-or-cmp.ll vector-reduce-and-bool.ll

[X86] vector-reduce-* - add 32-bit test coverage to the logic tests (#195627)
DeltaFile
+1,491-563llvm/test/CodeGen/X86/vector-reduce-or-cmp.ll
+1,334-623llvm/test/CodeGen/X86/vector-reduce-and-bool.ll
+1,134-608llvm/test/CodeGen/X86/vector-reduce-or-bool.ll
+1,165-407llvm/test/CodeGen/X86/vector-reduce-and-scalar.ll
+953-619llvm/test/CodeGen/X86/vector-reduce-xor-bool.ll
+1,126-406llvm/test/CodeGen/X86/vector-reduce-and-cmp.ll
+7,203-3,2263 files not shown
+8,946-3,9829 files

LLVM/project 8313977flang/lib/Lower/OpenMP ClauseProcessor.cpp OpenMP.cpp, flang/test/Lower/OpenMP dyn-groupprivate-clause.f90

[flang][mlir] Add flang to mlir lowering for dyn_groupprivate
DeltaFile
+186-0flang/test/Lower/OpenMP/dyn-groupprivate-clause.f90
+68-0flang/lib/Lower/OpenMP/ClauseProcessor.cpp
+18-0llvm/include/llvm/Frontend/OpenMP/ConstructDecompositionT.h
+0-10flang/test/Lower/OpenMP/Todo/dyn-groupprivate-clause.f90
+4-2flang/lib/Lower/OpenMP/OpenMP.cpp
+3-1flang/lib/Lower/OpenMP/ClauseProcessor.h
+279-136 files

LLVM/project 29dfc68llvm/lib/Transforms/InstCombine InstCombineSelect.cpp, llvm/test/Transforms/InstCombine select-ctpop-fold.ll

[InstCombine] Fold redundant select guards for ctpop (#195443)

Fixes #194207

Folds select patterns that guard ctpop for edge cases:
  `select (icmp ult X, 2), X, ctpop(X)`       --> `ctpop(X)`

These guards are unconditionally redundant since `ctpop(0)==0`,
`ctpop(1)==1` already.
DeltaFile
+94-0llvm/test/Transforms/InstCombine/select-ctpop-fold.ll
+10-0llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+104-02 files

LLVM/project d1e84bbclang/lib/Analysis ThreadSafetyCommon.cpp, clang/lib/Parse ParseDecl.cpp

Thread Safety Analysis: Support attributes on function pointers (#191187)

Allow acquire_capability, release_capability, requires_capability,
try_acquire_capability, assert_capability, and locks_excluded attributes
(incl. their shared variants) on function pointer variables and struct
fields. Calls through annotated function pointers are checked the same
way as direct function calls.

The attributes are placed on variable/field declarations, not on the
function pointer type itself. This is a deliberate trade-off: making
these "attributes" part of the type system would require diagnosing
mismatched assignments, which would be a significant type-system
extension with limited practical benefit, which would likely require
promoting the TSA vocabulary to full type-qualifiers. Instead, the
analysis trusts the annotations on the variable at the call site, and
sticks with the attribute-based semantics. This matches the existing
philosophy where the analysis tries to avoid false positives where
possible and attribute mismatches on direct functions are likewise not
hard errors or warnings (yet).

    [5 lines not shown]
DeltaFile
+140-0clang/test/SemaCXX/warn-thread-safety-analysis.cpp
+104-33clang/test/SemaCXX/warn-thread-safety-parsing.cpp
+74-9clang/lib/Sema/SemaDeclAttr.cpp
+45-9clang/lib/Analysis/ThreadSafetyCommon.cpp
+34-9clang/lib/Parse/ParseDecl.cpp
+42-0clang/test/Sema/warn-thread-safety-analysis.c
+439-609 files not shown
+532-7215 files

LLVM/project 581c67alibc/src/__support/FPUtil Hypot.h, libc/src/__support/FPUtil/generic FMA.h

[libc][math] Qualify all math functions to be constexpr
DeltaFile
+78-7libc/test/shared/shared_math_constexpr_test.cpp
+10-8libc/src/__support/math/sincosf_utils.h
+9-9libc/src/__support/FPUtil/generic/FMA.h
+9-8libc/src/__support/math/exp.h
+4-4libc/src/__support/math/sinhfcoshf_utils.h
+4-4libc/src/__support/FPUtil/Hypot.h
+114-40122 files not shown
+280-184128 files

LLVM/project 37f16adllvm/lib/Target/Mips MipsSchedule.td MicroMips32r6InstrInfo.td

[MIPS] Remove InstrItinClass definitions and MipsSchedule.td  (#188010)

Align Mips Targets with the rest of Architectures.

---------

Co-authored-by: Uros Stajic <uros.stajic at htecgroup.com>
DeltaFile
+0-742llvm/lib/Target/Mips/MipsSchedule.td
+210-301llvm/lib/Target/Mips/MicroMips32r6InstrInfo.td
+211-237llvm/lib/Target/Mips/MicroMipsInstrInfo.td
+205-225llvm/lib/Target/Mips/MipsInstrInfo.td
+194-209llvm/lib/Target/Mips/MipsInstrFPU.td
+158-192llvm/lib/Target/Mips/MipsDSPInstrInfo.td
+978-1,90622 files not shown
+1,720-2,87128 files

LLVM/project 81518d0llvm/test/Assembler dicompositetype-members.ll, llvm/test/DebugInfo/Generic verifier-invalid-disubprogram.ll

[DebugInfo] Verify DISubprogram has a type (#194556)

Require DISubprogram metadata to carry a non-null type in the verifier.

LangRef specifies that the `type:` field of `DISubprogram` points to a
`DISubroutineType`. This patch diagnoses malformed debug info where the
field is omitted or resolves to null, while preserving the existing wrong-type
diagnostic for non-DISubroutineType operands.

Update hand-written LLVM IR tests to use valid DISubprogram metadata
where they are not intentionally testing malformed debug info. These tests now 
use minimal DISubroutineType metadata so the new verifier check does not mask 
their original coverage.

Fixes #186557
DeltaFile
+74-35mlir/test/Target/LLVMIR/Import/debug-info.ll
+32-16mlir/test/Target/LLVMIR/llvmir-debug.mlir
+47-0llvm/test/Verifier/DISubprogram-type.ll
+23-21llvm/test/Transforms/SampleProfile/indirect-call.ll
+20-16llvm/test/Assembler/dicompositetype-members.ll
+18-16llvm/test/DebugInfo/Generic/verifier-invalid-disubprogram.ll
+214-104108 files not shown
+667-357114 files

LLVM/project 15383dcllvm/lib/Transforms/Scalar EarlyCSE.cpp, llvm/test/Transforms/EarlyCSE memset-load.ll

[EarlyCSE] Support memset loads (#194268)

This PR addresses the zero-`memset` case in EarlyCSE as discussed in
#194080. If we do a `memset` of zero and then load back from the same
base pointer, we can fold that load to `null`.
DeltaFile
+92-0llvm/test/Transforms/EarlyCSE/memset-load.ll
+26-0llvm/lib/Transforms/Scalar/EarlyCSE.cpp
+118-02 files

LLVM/project a699b25clang/lib/AST/ByteCode Compiler.cpp Interp.h, clang/test/AST/ByteCode cxx14.cpp

[clang][bytecode] Check reference initializers for one-past-the-end pointers (#195501)
DeltaFile
+17-4clang/lib/AST/ByteCode/Compiler.cpp
+7-0clang/test/AST/ByteCode/cxx14.cpp
+5-0clang/lib/AST/ByteCode/Interp.h
+3-0clang/lib/AST/ByteCode/Opcodes.td
+32-44 files

LLVM/project 2507314mlir/include/mlir/Dialect/OpenMP OpenMPEnums.td OpenMPClauses.td, mlir/lib/Dialect/OpenMP/IR OpenMPDialect.cpp

[OpenMP][mlir] Add DynGroupPrivateClause in omp dialect (#153562)

- The `dyn_groupprivate` clause allows to dynamically allocate
group-private memory in OpenMP parallel regions, specifically for
`target` and `teams` directives.
- This clause enables runtime-sized private memory allocation and
applicable to target and teams ops.

This PR enables dyn_groupprivate clause in openmp mlir dialect and adds
it to Teams and Target ops. Also includes parser, printer and
verification for clause.
DeltaFile
+128-4mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
+65-4mlir/test/Dialect/OpenMP/invalid.mlir
+44-0mlir/test/Target/LLVMIR/openmp-target-dyn-groupprivate.mlir
+37-3mlir/test/Dialect/OpenMP/ops.mlir
+38-0mlir/include/mlir/Dialect/OpenMP/OpenMPEnums.td
+35-0mlir/include/mlir/Dialect/OpenMP/OpenMPClauses.td
+347-115 files not shown
+412-2111 files

LLVM/project 0a70551flang/include/flang/Lower AbstractConverter.h, flang/lib/Lower Bridge.cpp

support device_type groupprivate lowering
DeltaFile
+21-3flang/lib/Lower/OpenMP/OpenMP.cpp
+22-0flang/test/Lower/OpenMP/groupprivate.f90
+19-1flang/include/flang/Lower/AbstractConverter.h
+11-0flang/lib/Lower/Bridge.cpp
+73-44 files

LLVM/project b19bd33libc/src/__support/FPUtil nearest_integer.h, libc/src/__support/FPUtil/generic FMA.h

[libc][math] Qualify all math functions to be constexpr
DeltaFile
+78-7libc/test/shared/shared_math_constexpr_test.cpp
+9-9libc/src/__support/FPUtil/generic/FMA.h
+10-8libc/src/__support/math/sincosf_utils.h
+9-8libc/src/__support/math/exp.h
+5-3libc/src/__support/FPUtil/nearest_integer.h
+4-4libc/src/__support/math/sincos_integer_utils.h
+115-39121 files not shown
+277-183127 files

LLVM/project 8b25820clang/lib/AST/ByteCode Interp.cpp Function.h, clang/test/AST/ByteCode records.cpp

[clang][bytecode] Diagnose copying empty mutable unions (#195529)

We had a special case for copy/move ctors of empty unions. Remove that.
Everything else is just so we don't regress diagnostics.
DeltaFile
+36-0clang/test/AST/ByteCode/records.cpp
+10-0clang/lib/AST/ByteCode/Interp.cpp
+8-1clang/lib/AST/ByteCode/Function.h
+4-3clang/lib/AST/ByteCode/Compiler.cpp
+0-5clang/lib/AST/ByteCode/InterpFrame.cpp
+2-1clang/lib/AST/ByteCode/Function.cpp
+60-106 files

LLVM/project a9a899dllvm/test/CodeGen/X86 vector-reduce-smin.ll vector-reduce-smax.ll

[X86] vector-reduce-* - add 32-bit test coverage to the minmax tests (#195617)

The horizontal-reduce-* tests already have 32-bit coverage but they will be retired soon.
DeltaFile
+2,928-1,388llvm/test/CodeGen/X86/vector-reduce-smin.ll
+2,924-1,389llvm/test/CodeGen/X86/vector-reduce-smax.ll
+2,677-1,279llvm/test/CodeGen/X86/vector-reduce-umax.ll
+2,628-1,271llvm/test/CodeGen/X86/vector-reduce-umin.ll
+11,157-5,3274 files

LLVM/project 9e59307libc/src/__support/math sqrtbf16.h dfmal.h

format
DeltaFile
+3-1libc/src/__support/math/sqrtbf16.h
+2-1libc/src/__support/math/dfmal.h
+2-1libc/src/__support/math/bf16fmal.h
+7-33 files

LLVM/project bfe538clibc/src/__support/FPUtil Hypot.h nearest_integer.h, libc/src/__support/FPUtil/generic FMA.h

[libc][math] Qualify all math functions to be constexpr
DeltaFile
+77-6libc/test/shared/shared_math_constexpr_test.cpp
+9-9libc/src/__support/FPUtil/generic/FMA.h
+10-8libc/src/__support/math/sincosf_utils.h
+9-8libc/src/__support/math/exp.h
+4-4libc/src/__support/FPUtil/Hypot.h
+5-3libc/src/__support/FPUtil/nearest_integer.h
+114-38120 files not shown
+271-181126 files

LLVM/project 9fe04e0llvm/docs LangRef.rst, llvm/lib/IR Verifier.cpp

[IR] Add require-logical-module module flag (#193502)

This module flag is optional and can be set to require the use of
logical alloca/gep instructions.
This flag will have 2 usages:

- tell optimization which flavor of GEP/alloca to emit
- fail loudly if a GEP/alloca is emitted in a module targeting logical.
DeltaFile
+30-0llvm/test/Verifier/logical-pointer-notrequired.ll
+18-0llvm/test/Verifier/logical-pointer-required.ll
+18-0llvm/test/Verifier/logical-pointer-required-failure.ll
+10-0llvm/lib/IR/Verifier.cpp
+10-0llvm/docs/LangRef.rst
+86-05 files

LLVM/project a297558flang/include/flang/Lower OpenMP.h, flang/lib/Lower/OpenMP OpenMP.cpp

[flang][mlir] Add flang to mlir lowering for groupprivate
DeltaFile
+186-0flang/test/Lower/OpenMP/groupprivate.f90
+123-1flang/lib/Lower/OpenMP/OpenMP.cpp
+0-9flang/test/Lower/OpenMP/Todo/groupprivate.f90
+1-0flang/include/flang/Lower/OpenMP.h
+310-104 files

LLVM/project 9ae5374clang/include/clang/CIR/Dialect/Builder CIRBaseBuilder.h, clang/include/clang/CIR/Dialect/IR CIROps.td CIREnumAttr.td

[CIR] Replace nsw/nuw unit attrs with OverflowFlags BitEnum

Combine the separate `no_signed_wrap` and `no_unsigned_wrap` unit
properties on arithmetic ops into a single `OverflowFlags` BitEnum
(`nsw`, `nuw`). This allows combined flags to be written as
`nsw|nuw` in assembly, replaces the per-flag verification traits
with a single `OverflowFlagsRequireIntType` predicate, and folds
the two `HasAtMostOneOfAttrs` checks into one
`SatExclusiveWithOverflowFlags` predicate.

The bit layout matches `mlir::LLVM::IntegerOverflowFlags`, so
lowering casts the value directly and asserts the layout via
static_assert.

Updates IncOp/DecOp/MinusOp builders, CIRGenExprScalar, and
LowerItaniumCXXABI to the new API. Adds round-trip and
verification tests in clang/test/CIR/IR/.
DeltaFile
+41-32clang/include/clang/CIR/Dialect/IR/CIROps.td
+66-0clang/test/CIR/IR/overflow-flags.cir
+39-0clang/test/CIR/IR/invalid-overflow.cir
+18-12clang/include/clang/CIR/Dialect/Builder/CIRBaseBuilder.h
+15-7clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+15-0clang/include/clang/CIR/Dialect/IR/CIREnumAttr.td
+194-513 files not shown
+217-589 files

LLVM/project 68aede0clang/test/Sema wave-reduce-builtins-validate-amdgpu.cl

Missing SEMA tests
DeltaFile
+26-0clang/test/Sema/wave-reduce-builtins-validate-amdgpu.cl
+26-01 files

LLVM/project bebeb17clang/include/clang/Basic BuiltinsAMDGPU.td, clang/lib/CodeGen/TargetBuiltins AMDGPU.cpp

[AMDGPU] Add builtins for wave reduction intrinsics

Assisted by - Claude-sonnet:4.6
DeltaFile
+189-0clang/test/CodeGenOpenCL/builtins-amdgcn.cl
+18-0clang/lib/CodeGen/TargetBuiltins/AMDGPU.cpp
+9-0clang/include/clang/Basic/BuiltinsAMDGPU.td
+216-03 files

LLVM/project 2f7e579llvm/lib/Target/AMDGPU SIISelLowering.cpp SIInstructions.td, llvm/test/CodeGen/AMDGPU llvm.amdgcn.reduce.xor.ll llvm.amdgcn.reduce.or.ll

[AMDGPU] Support Wave Reduction for true-16 types - 3

Supporting true-16 versions of the reduction intrinsics
Supported Ops: `and`, `or`, `xor`.
Supports only the iterative stratergy, DPP is yet
to be supported.
DeltaFile
+284-137llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.xor.ll
+243-116llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.or.ll
+243-116llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.and.ll
+20-3llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+4-1llvm/lib/Target/AMDGPU/SIInstructions.td
+794-3735 files

LLVM/project 4bb101ellvm/lib/Target/AMDGPU SIISelLowering.cpp

fix formatting
DeltaFile
+4-3llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+4-31 files

LLVM/project 2e88192llvm/lib/Target/AMDGPU SIISelLowering.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.reduce.and.ll llvm.amdgcn.reduce.or.ll

Use only SALU opcodes
DeltaFile
+35-43llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.and.ll
+33-41llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.or.ll
+33-41llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.xor.ll
+3-9llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+104-1344 files

LLVM/project dc79e2aflang/include/flang/Optimizer/Builder TemporaryStorage.h, flang/lib/Optimizer/Builder TemporaryStorage.cpp

[flang] avoid introducing iteration dependencies in WHERE and FORALL temporaries (#195053)

This patch improves the addressing of temporaries created when needed for simple FORALL or WHERE as below to not introduce iteration dependencies.

```
subroutine foo(p1, p2, mask)
  real, pointer :: p1(:), p2(:)
  logical :: mask(:)
  where (mask) p1 = p2
end subroutine
```

Instead of using a stack like temporary that uses a counter to push and fetch elements, the loop IVs are directly used to address the temporaries. This makes it easier to later vectorize or parallelize those loops.

This is only done when:
- This is not a FORALL with array expressions
- The dynamic type is the same at each iterations
- The WHERE and FORALL do not create loops of depth more than 15.
- If there are FORALLs, their strides are constants 1 or -1.

    [3 lines not shown]
DeltaFile
+130-172flang/test/HLFIR/order_assignments/inlined-stack-temp.fir
+207-0flang/test/HLFIR/order_assignments/array-temp.fir
+86-9flang/lib/Optimizer/HLFIR/Transforms/LowerHLFIROrderedAssignments.cpp
+82-0flang/lib/Optimizer/Builder/TemporaryStorage.cpp
+47-7flang/include/flang/Optimizer/Builder/TemporaryStorage.h
+45-0flang/test/HLFIR/order_assignments/array-temp-many-forall.f90
+597-1883 files not shown
+620-2189 files

LLVM/project 94ca490clang/include/clang/Basic DiagnosticSemaKinds.td, clang/lib/Sema SemaDeclAttr.cpp SemaChecking.cpp

[clang][SYCL] Handle cdecl variadic functions for SYCL device (#194922)

SYCL doesn't allow variadic functions to be called from device code.
Since SYCL device compilation mostly uses targets that don't natively
support variadic fucntions, we now issue an error even if the variadic
function is never called from the device if it has cdecl calling
convention attribute. We also now don't issue an error if a variadic
function is called from the device code. This patch defers the error
caused by cdecl attribute to the actual call point and adds diagnosing
of variadic function calls on device side using deferred diagnostics.
DeltaFile
+45-0clang/test/SemaSYCL/variadic-func-call.cpp
+35-0clang/test/SemaSYCL/sycl-cconv.cpp
+6-8clang/lib/Sema/SemaDeclAttr.cpp
+6-0clang/lib/Sema/SemaChecking.cpp
+2-1clang/include/clang/Basic/DiagnosticSemaKinds.td
+94-95 files

LLVM/project f4e1623llvm/lib/Target/AMDGPU SIISelLowering.cpp SIInstructions.td, llvm/test/CodeGen/AMDGPU llvm.amdgcn.reduce.xor.ll llvm.amdgcn.reduce.and.ll

[AMDGPU] Support Wave Reduction for i16 types - 3

Supported Ops: `and`, `or`, `xor`.
Supports only the iterative stratergy, DPP is yet
to be supported.
Supports only Fake-16 versions of the lowering.
True-16 support is yet to be added.
DeltaFile
+587-160llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.xor.ll
+487-136llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.and.ll
+487-136llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.or.ll
+24-2llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+3-0llvm/lib/Target/AMDGPU/SIInstructions.td
+1,588-4345 files