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

LLVM/project d508d97llvm/lib/Target/AMDGPU SIISelLowering.cpp SIInstructions.td, llvm/test/CodeGen/AMDGPU llvm.amdgcn.reduce.sub.ll llvm.amdgcn.reduce.add.ll

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

Supporting true-16 versions of the reduction intrinsics
Supported Ops: `add`, `sub`.
Supports only the iterative stratergy, DPP is yet
to be supported.
DeltaFile
+373-185llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.sub.ll
+357-176llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.add.ll
+12-1llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+3-1llvm/lib/Target/AMDGPU/SIInstructions.td
+745-3634 files

LLVM/project 92f2857llvm/lib/Target/AMDGPU SIISelLowering.cpp SIInstructions.td, llvm/test/CodeGen/AMDGPU llvm.amdgcn.reduce.sub.ll llvm.amdgcn.reduce.add.ll

[AMDGPU] Support Wave Reduction for i16 types - 2

Supported Ops: `add`, `sub`.
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
+658-177llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.sub.ll
+637-173llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.add.ll
+23-1llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+2-0llvm/lib/Target/AMDGPU/SIInstructions.td
+1,320-3514 files

LLVM/project 73939a2llvm/lib/Target/AMDGPU SIISelLowering.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.reduce.min.ll

Use `REG_SEQUENCE` instead of `COPY`
DeltaFile
+25-19llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+1-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.min.ll
+26-192 files

LLVM/project c24fc71llvm/lib/Transforms/Scalar LICM.cpp, llvm/test/Transforms/LICM store-hoisting.ll hoist-inaccesiblemem-call.ll

Revert [LICM] Remove unnecessary check during store hoisting (#195606)

This check is needed after all, to handle the case where the load
aliases only on the first iteration. Even with correct cross-iteration
handling in MSSA, it's legal to return an out of loop clobbering memory
accesses in this case.

Reverts https://github.com/llvm/llvm-project/pull/187529.
Fixes https://github.com/llvm/llvm-project/issues/195513.
DeltaFile
+35-0llvm/test/Transforms/LICM/store-hoisting.ll
+5-3llvm/test/Transforms/LICM/hoist-inaccesiblemem-call.ll
+6-0llvm/lib/Transforms/Scalar/LICM.cpp
+2-1llvm/test/Transforms/LICM/call-hoisting.ll
+1-1llvm/test/Transforms/LICM/pr54495.ll
+49-55 files

LLVM/project c859a27clang-tools-extra/clang-tidy/modernize UseStringViewCheck.cpp UseStringViewCheck.h, clang-tools-extra/test/clang-tidy/checkers/modernize use-string-view-overloaded.cpp use-string-view.cpp

[clang-tidy] An option for conditional skipping overloaded functions … (#194133)

…in modernize-use-string-view
DeltaFile
+146-0clang-tools-extra/test/clang-tidy/checkers/modernize/use-string-view-overloaded.cpp
+0-91clang-tools-extra/test/clang-tidy/checkers/modernize/use-string-view.cpp
+7-3clang-tools-extra/clang-tidy/modernize/UseStringViewCheck.cpp
+4-0clang-tools-extra/clang-tidy/modernize/UseStringViewCheck.h
+157-944 files

LLVM/project fe3fd1eclang/test/Preprocessor riscv-intrinsic-exts.c

[clang][RISCV] Add REQRUIES to riscv-intrinsic-exts.c (#195605)
DeltaFile
+2-0clang/test/Preprocessor/riscv-intrinsic-exts.c
+2-01 files

LLVM/project 5ef4320clang/test/CodeGenOpenCL amdgpu-enqueue-kernel.cl, llvm/docs LangRef.rst

[IR] Remove volatile from nosync (#194391)

Volatile operations are explicitly specified as not synchronizing...

> This is not Java’s “volatile” and has no cross-thread synchronization
behavior.

... and LLVM does not model them as being synchronizing anywhere, except
the definition of this attribute, which is largely unused outside the
Attributor.

The ordering requirements of volatile operations are already fully
encoded in their memory effects (unlike what is the case for
stronger-than-monotonic atomics).

Clarify that "nosync" is specifically in the sense of
"synchronizes-with" (rather than just any cross-thread communication)
and remove volatile operations from the definition.
DeltaFile
+208-206llvm/test/Transforms/Attributor/liveness.ll
+131-73llvm/test/Transforms/Attributor/nosync.ll
+34-35clang/test/CodeGenOpenCL/amdgpu-enqueue-kernel.cl
+16-15llvm/include/llvm/IR/Intrinsics.td
+6-6llvm/test/Transforms/InstCombine/struct-assign-tbaa-new.ll
+6-5llvm/docs/LangRef.rst
+401-34064 files not shown
+507-47470 files

LLVM/project 1561e51libc/shared/math isnanl.h, libc/src/__support/math isnan.h isnanl.h

[libc][math] Refactor isnan family to header-only (#195598)

Refactors the isnan math family to be header-only.

part of: #147386

Target Functions:
  - isnan
  - isnanf
  - isnanl
  
Also adds `__LIBC_USE_BUILTIN_ISNAN` compiler feature detection
DeltaFile
+48-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+30-0libc/src/__support/math/isnan.h
+30-0libc/src/__support/math/isnanl.h
+30-0libc/src/__support/math/isnanf.h
+27-0libc/src/__support/math/CMakeLists.txt
+23-0libc/shared/math/isnanl.h
+188-013 files not shown
+272-919 files

LLVM/project c33d4bfclang/include/clang/Analysis/Analyses/LifetimeSafety Origins.h, clang/lib/Analysis/LifetimeSafety Origins.cpp FactsGenerator.cpp

[LifetimeSafety] Track per-field origins for record types
DeltaFile
+230-8clang/test/Sema/warn-lifetime-safety.cpp
+82-8clang/lib/Analysis/LifetimeSafety/Origins.cpp
+59-24clang/include/clang/Analysis/Analyses/LifetimeSafety/Origins.h
+39-10clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp
+21-12clang/lib/Analysis/LifetimeSafety/LiveOrigins.cpp
+4-6clang/test/Sema/warn-lifetime-safety-dangling-field.cpp
+435-682 files not shown
+440-688 files

LLVM/project 52340a4libc/src/__support/math CMakeLists.txt roundf16.h, libc/src/math/generic CMakeLists.txt

[libc][math] Refactor round-roundeven-trunc family to header-only (#195590)

Refactors the round-roundeven-trunc math family to be header-only.

part of: #147386

Target Functions:
  - round
  - roundbf16
  - roundf
  - roundf128
  - roundf16
  - roundl
  - roundeven
  - roundevenbf16
  - roundevenf
  - roundevenf128
  - roundevenf16
  - roundevenl

    [5 lines not shown]
DeltaFile
+264-15utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+198-0libc/src/__support/math/CMakeLists.txt
+18-66libc/src/math/generic/CMakeLists.txt
+39-0libc/src/__support/math/roundf16.h
+39-0libc/src/__support/math/truncf16.h
+39-0libc/src/__support/math/roundevenf16.h
+597-8155 files not shown
+1,605-21761 files

LLVM/project 3a5f8aelld/ELF Relocations.cpp

[ELF] Remove dead stable_sort in TargetInfo::scanSectionImpl. NFC (#195601)

Dead since the code is moved to target-specific relocation scanning.
DeltaFile
+0-8lld/ELF/Relocations.cpp
+0-81 files

LLVM/project ec0ee3blld/test/ELF systemz-reloc-gotrel.s

[SystemZ,test] Cover non-preemptible PLTOFF (#195600)

R_390_PLTOFF{16,32,64} against a non-preemptible (hidden) symbol takes
fromPlt(R_PLT_GOTREL) → R_GOTREL in RelocScan::process so the relocation
resolves to symbol - .got with no PLT entry. Add tests to fix the
the test gap from the initial SystemZ port
(fe3406e349884e4ef61480dd0607f1e237102c74).
DeltaFile
+31-8lld/test/ELF/systemz-reloc-gotrel.s
+31-81 files

LLVM/project cd077balibc/src/__support/FPUtil/x86_64 NextAfterLongDouble.h

[libc][math][NFC] Fix nextafterl build (#195599)
DeltaFile
+1-1libc/src/__support/FPUtil/x86_64/NextAfterLongDouble.h
+1-11 files

LLVM/project 0d7ad3dlibc/src/__support/FPUtil ManipulationFunctions.h, libc/src/__support/math nextafterbf16.h nextafterf.h

[libc][math] Qualify nextafter functions to constexpr (#195596)

Signed-off-by: udaykiriti <udaykiriti624 at gmail.com>
DeltaFile
+10-0libc/test/shared/shared_math_constexpr_test.cpp
+6-0libc/test/shared/CMakeLists.txt
+1-1libc/src/__support/math/nextafterbf16.h
+1-1libc/src/__support/math/nextafterf.h
+1-1libc/src/__support/FPUtil/ManipulationFunctions.h
+1-1libc/src/__support/math/nextafterf16.h
+20-43 files not shown
+23-79 files

LLVM/project d9c7b66libc/test/shared CMakeLists.txt

[libc][math][NFC] Remove `-fconstexpr-steps` flag (#195593)
DeltaFile
+0-3libc/test/shared/CMakeLists.txt
+0-31 files