LLVM/project ad9e815clang/test/Sema/LifetimeSafety safety.cpp

merge
DeltaFile
+2-3clang/test/Sema/LifetimeSafety/safety.cpp
+2-31 files

LLVM/project 5d68f75llvm/include/llvm/Support KnownBits.h, llvm/lib/Support KnownBits.cpp

[Analysis] Improve readability of `KnownBits::pext` and `KnownBits::pdep` (#205176)

- Change the parameter names to `Val` and `Mask` to emphasize their semantics.
- Use `clearBits` instead of bitwise AND for increased expressiveness.
- Rewrite explanatory comments.
DeltaFile
+42-39llvm/lib/Support/KnownBits.cpp
+4-4llvm/include/llvm/Support/KnownBits.h
+46-432 files

LLVM/project 89b8357clang/include/clang/Analysis/Analyses/LifetimeSafety Facts.h FactsGenerator.h, clang/lib/Analysis/LifetimeSafety FactsGenerator.cpp

[LifetimeSafety] Fix loop liveness leakage for conditional operator

Generate flow facts for conditional operators in their respective
predecessor blocks (branches) instead of the merge block, path-isolating
the flows and preventing liveness from leaking across loop backedges.

Also includes tests, formatting cleanups, and refactoring of the flow propagation.

TAG=agy
CONV=b4614911-a1e1-489f-a395-2f895c423788
DeltaFile
+49-55clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp
+18-0clang/test/Sema/LifetimeSafety/safety.cpp
+4-0clang/include/clang/Analysis/Analyses/LifetimeSafety/Facts.h
+2-1clang/include/clang/Analysis/Analyses/LifetimeSafety/FactsGenerator.h
+73-564 files

LLVM/project be32acfclang/include/clang/Analysis/Analyses/LifetimeSafety FactsGenerator.h, clang/lib/Analysis/LifetimeSafety FactsGenerator.cpp LiveOrigins.cpp

Reapply "[LifetimeSafety] Fix liveness propagation for all origin flows (#205323)" (#205687)

This reverts commit d4cf04ba17c833cfbab5a16aa2d21f7185a0c9ae.
DeltaFile
+69-0clang/test/Sema/LifetimeSafety/safety.cpp
+23-6clang/test/Sema/LifetimeSafety/invalidations.cpp
+21-0clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp
+14-3clang/lib/Analysis/LifetimeSafety/LiveOrigins.cpp
+1-0clang/include/clang/Analysis/Analyses/LifetimeSafety/FactsGenerator.h
+128-95 files

LLVM/project d9cb3e5clang/lib/CIR/CodeGen CIRGenExprComplex.cpp, clang/test/CIR/CodeGen cxx-rewritten-binary-operator.cpp

[CIR] Implement CXXRewrittenBinaryOperator for ComplexExpr (#204670)

Implement CXXRewrittenBinaryOperator support for ComplexExpr

Issue #192331
DeltaFile
+52-0clang/test/CIR/CodeGen/cxx-rewritten-binary-operator.cpp
+1-3clang/lib/CIR/CodeGen/CIRGenExprComplex.cpp
+53-32 files

LLVM/project a01500blibc/shared/math expbf16.h, libc/src/__support/math expbf16.h CMakeLists.txt

[libc][math][c++23] Add expbf16 math function (#161919)

This PR adds expbf16 higher math function for BFloat16 type along with
the tests.

---------

Signed-off-by: Krishna Pandey <kpandey81930 at gmail.com>
DeltaFile
+208-0libc/src/__support/math/expbf16.h
+69-0libc/test/src/math/smoke/expbf16_test.cpp
+41-0libc/test/src/math/expbf16_test.cpp
+29-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+23-0libc/shared/math/expbf16.h
+22-0libc/src/__support/math/CMakeLists.txt
+392-025 files not shown
+497-131 files

LLVM/project 7916ddcllvm/test/CodeGen/X86 horizontal-reduce-add.ll horizontal-reduce-fadd.ll

[X86] Remove old horizontal-reduce-add/fadd tests (#206238)

These patterns are now handled in middle-end and tested for in
PhaseOrdering/X86

The vector.reduce.add/fadd patterns are tested in CodeGen/X86 in
vector-reduce-add.ll, vector-reduce-fadd.ll and
vector-reduce-fadd-fast.ll
DeltaFile
+0-408llvm/test/CodeGen/X86/horizontal-reduce-add.ll
+0-347llvm/test/CodeGen/X86/horizontal-reduce-fadd.ll
+0-7552 files

LLVM/project 05f6994llvm/include/llvm/IR PatternMatch.h Constant.h, llvm/lib/Analysis VectorUtils.cpp

[IR][NFC] Introduce Constant::containsMatchingVectorElement and corresponding matcher (#200502)

A common pattern when dealing with vectors is to iterate over each
element and check whether any element satisfies a condition. Introduce
`Constant::containsMatchingVectorElement` to generalize this behavior
along with a corresponding matcher `m_ContainsMatchingVectorElement`
which checks whether any elements match the given subpattern.

Remove function `llvm::maskContainsAllOneOrUndef` in favor of using this
generalization instead.

Co-authored-by: Ramkumar Ramachandra <r at artagnon.com>
DeltaFile
+17-13llvm/lib/IR/Constants.cpp
+21-6llvm/include/llvm/IR/PatternMatch.h
+3-16llvm/lib/Analysis/VectorUtils.cpp
+4-9llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+3-10llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
+5-0llvm/include/llvm/IR/Constant.h
+53-546 files

LLVM/project e7cd51bclang/tools/driver cc1_main.cpp, llvm/include/llvm/MC MCSubtargetInfo.h

Reapply "[MC][NFC] Make FeatureKV/SubtargetKV pointers private" (#206234) (#206237)

Fix C++20 build by adding an explicit constructor. This also permits
making the fields private.

This reapplies #206178.
This reverts commit e44103c5d9feaaf914fdf1a6859d0fe91269fe46.
DeltaFile
+39-13llvm/include/llvm/MC/MCSubtargetInfo.h
+15-14llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+12-11llvm/lib/MC/MCSubtargetInfo.cpp
+6-6clang/tools/driver/cc1_main.cpp
+4-4llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
+3-3llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp
+79-514 files not shown
+88-6010 files

LLVM/project 87166bfllvm/lib/Transforms/InstCombine InstCombineSelect.cpp, llvm/test/Transforms/InstCombine fold-select-trunc.ll

[InstCombine] Handle logical and/or (trunc x), y -> and/or x, y IIF y in range [0,2) (#205579)

proof: https://alive2.llvm.org/ce/z/UURtdB
DeltaFile
+116-0llvm/test/Transforms/InstCombine/fold-select-trunc.ll
+14-0llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+130-02 files

LLVM/project ee1fd09clang/tools/driver cc1_main.cpp, llvm/include/llvm/MC MCSubtargetInfo.h

[spr] initial version

Created using spr 1.3.8-wip
DeltaFile
+39-13llvm/include/llvm/MC/MCSubtargetInfo.h
+15-14llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+12-11llvm/lib/MC/MCSubtargetInfo.cpp
+6-6clang/tools/driver/cc1_main.cpp
+4-4llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
+3-3llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp
+79-514 files not shown
+88-6010 files

LLVM/project 55ddad1mlir/lib/Dialect/MemRef/Transforms RuntimeOpVerification.cpp, mlir/test/Dialect/MemRef runtime-verification.mlir

[mlir][memref] Fix runtime verification of expand_shape (#206125)

The original runtime verification only multiplied static output
dimensions per reassociation group and checked `srcDim % staticProduct`
== 0, which failed to catch invalid dynamic dimension values.
The new verification uses getMixedOutputShape() to get all output
dimensions (static and dynamic), computes their product, and asserts
`product == srcDim`. Fixes #205981.

Assisted-by: MiMo-V2.5-Pro
DeltaFile
+84-0mlir/test/Integration/Dialect/MemRef/expand-shape-runtime-verification.mlir
+15-25mlir/lib/Dialect/MemRef/Transforms/RuntimeOpVerification.cpp
+6-6mlir/test/Dialect/MemRef/runtime-verification.mlir
+105-313 files

LLVM/project e44103cclang/tools/driver cc1_main.cpp, llvm/include/llvm/MC MCSubtargetInfo.h

Revert "[MC][NFC] Make FeatureKV/SubtargetKV pointers private" (#206234)

Build failures in C++20 mode due to deleted constructor preventing brace
initialization.

Reverts llvm/llvm-project#206178
DeltaFile
+14-28llvm/include/llvm/MC/MCSubtargetInfo.h
+14-15llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+11-12llvm/lib/MC/MCSubtargetInfo.cpp
+6-6clang/tools/driver/cc1_main.cpp
+4-4llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
+3-3llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp
+52-684 files not shown
+61-7710 files

LLVM/project 46b70b9clang/tools/driver cc1_main.cpp, llvm/include/llvm/MC MCSubtargetInfo.h

Revert "[MC][NFC] Make FeatureKV/SubtargetKV pointers private (#206178)"

This reverts commit 0b3d2ae22d4adbdb45a1ed0348ff574b8eeb80a4.
DeltaFile
+14-28llvm/include/llvm/MC/MCSubtargetInfo.h
+14-15llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+11-12llvm/lib/MC/MCSubtargetInfo.cpp
+6-6clang/tools/driver/cc1_main.cpp
+4-4llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
+3-3mlir/lib/Target/LLVMIR/Transforms/TargetToTargetFeatures.cpp
+52-684 files not shown
+61-7710 files

LLVM/project e1aa3a9llvm/lib/Target/RISCV RISCVAsmPrinter.cpp, llvm/lib/Target/RISCV/AsmParser RISCVAsmParser.cpp

[spr] initial version

Created using spr 1.3.8-wip
DeltaFile
+16-21llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+8-8llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp
+5-4llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h
+3-5llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.cpp
+2-6llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
+1-2llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp
+35-461 files not shown
+36-477 files

LLVM/project 6294eacllvm/lib/Target/WebAssembly WebAssemblyTargetMachine.cpp WebAssemblyAsmPrinter.cpp

[spr] initial version

Created using spr 1.3.8-wip
DeltaFile
+21-20llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
+8-3llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
+0-4llvm/lib/Target/WebAssembly/WebAssemblySubtarget.h
+29-273 files

LLVM/project e8d5efallvm/lib/Target/AMDGPU AMDGPURemoveIncompatibleFunctions.cpp

[spr] initial version

Created using spr 1.3.8-wip
DeltaFile
+13-16llvm/lib/Target/AMDGPU/AMDGPURemoveIncompatibleFunctions.cpp
+13-161 files

LLVM/project e4c808alibcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members put_double.pass.cpp put_long_double.pass.cpp

ignore aix
DeltaFile
+2-0libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp
+2-0libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp
+4-02 files

LLVM/project 0b3d2aeclang/tools/driver cc1_main.cpp, llvm/include/llvm/MC MCSubtargetInfo.h

[MC][NFC] Make FeatureKV/SubtargetKV pointers private (#206178)

This is preliminary work for changing the representation of
FeatureKV/SubTypeKV to need less relocations. As a first step, avoid all
direct references to these pointers.
DeltaFile
+28-14llvm/include/llvm/MC/MCSubtargetInfo.h
+15-14llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+12-11llvm/lib/MC/MCSubtargetInfo.cpp
+6-6clang/tools/driver/cc1_main.cpp
+4-4llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
+3-3llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
+68-524 files not shown
+77-6110 files

LLVM/project b272709mlir/include/mlir/Conversion Passes.td, mlir/test/Conversion/ArithAndMathToAPFloat math-to-apfloat.mlir

[mlir][math] Add VectorDialect dependency to MathToAPFloatConversion (#206212)

Explicitly load VectorDialect as a dependent dialect in
MathToAPFloatConversionPass to avoid unregistered dialect errors when
generating vector ops. Fixes #206093.
DeltaFile
+15-1mlir/test/Conversion/ArithAndMathToAPFloat/math-to-apfloat.mlir
+5-1mlir/include/mlir/Conversion/Passes.td
+20-22 files

LLVM/project b1a3b8blibcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members put_long_double.pass.cpp

fix long double
DeltaFile
+2-2libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp
+2-21 files

LLVM/project b11727flibcxx/docs/Status Cxx23Issues.csv, libcxx/test/std/input.output/syncstream/syncbuf/syncstream.syncbuf.assign swap.pass.cpp assign.pass.cpp

[libc++] Mark LWG3498 as resolved (#206078)

Closes https://github.com/llvm/llvm-project/issues/104375.

LWG3498 was implemented in LLVM 18 together with P0053R7 via
7cc72a0a2ec22855572d96411febd4f2c4ac5a49.
DeltaFile
+2-1libcxx/test/std/input.output/syncstream/syncbuf/syncstream.syncbuf.assign/swap.pass.cpp
+1-1libcxx/docs/Status/Cxx23Issues.csv
+1-0libcxx/test/std/input.output/syncstream/syncbuf/syncstream.syncbuf.assign/assign.pass.cpp
+4-23 files

LLVM/project a6fc84dlibcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members lwg4084.pass.cpp put_double.pass.cpp

address review comments
DeltaFile
+0-65libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/lwg4084.pass.cpp
+47-0libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp
+47-0libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp
+94-653 files

LLVM/project fc715f8libcxx/docs/Status Cxx26Issues.csv, libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members lwg4084.pass.cpp

[libc++] Mark lwg4084 as resolved
DeltaFile
+65-0libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/lwg4084.pass.cpp
+1-1libcxx/docs/Status/Cxx26Issues.csv
+66-12 files

LLVM/project 6101b0bllvm/lib/TargetParser X86TargetParser.cpp

[X86][NFC] Use compact enum in TargetParser (#206088)

ProcessorDefs and FeatureInfoDefs store strings together with constant
data. Use the compact enum tables to avoid dynamic relocations for the
strings.
DeltaFile
+180-184llvm/lib/TargetParser/X86TargetParser.cpp
+180-1841 files

LLVM/project aab67dblibcxx/include/__memory shared_ptr.h, libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const pointer_deleter_allocator.pass.cpp

[libc++] Fix shared_ptr rebinding allocators to incomplete types (#206145)

https://github.com/llvm/llvm-project/pull/200401 caused various ways to
create a `shared_ptr` control block to reject any allocators which
required a complete type. This patch allows allocators to again require
a complete type.
DeltaFile
+16-15libcxx/include/__memory/shared_ptr.h
+6-0libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared_for_overwrite.pass.cpp
+4-0libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator.pass.cpp
+1-1libcxx/test/support/min_allocator.h
+1-0libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared.pass.cpp
+28-165 files

LLVM/project 212ae47clang/lib/AST/ByteCode Compiler.cpp, clang/test/AST/ByteCode codegen.cpp

[clang][bytecode] Make more reinterpret_casts non-fatal (#206056)

Looks like we can handle more of them these days.
DeltaFile
+1-26clang/lib/AST/ByteCode/Compiler.cpp
+1-1clang/test/AST/ByteCode/codegen.cpp
+1-0clang/test/CodeGen/cfi-unchecked-callee-attribute.cpp
+3-273 files

LLVM/project 9f423a9mlir/include/mlir/Dialect/Linalg/IR LinalgStructuredOps.td, mlir/test/Dialect/Linalg invalid.mlir

[mlir][linalg] Restrict linalg.contract results (#205988)

I tightened linalg.contract so buffer-style uses cannot produce memref
results. This keeps the op consistent with destination-style semantics
and turns the bad input into a verifier error instead of letting later
rewrites crash.
Fixes #205708
DeltaFile
+15-0mlir/test/Dialect/Linalg/invalid.mlir
+1-1mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
+16-12 files

LLVM/project 106644flldb/tools/driver CMakeLists.txt

[lldb][driver] Fix ELF interposition of HostInfoBase symbols causing segfault (#204710)

Commit 67e571d (#179306) added lldbHost and lldbUtility to
`LLDB_DRIVER_LINK_LIBS` A side-effect is that HostInfoBase.cpp, which
contains the file-static `g_fields` pointer, is now compiled into both
the lldb binary and liblldb.so, giving each its own independent
`g_fields`.

On ELF platforms this creates an interposition hazard. When
`LLDB_ENABLE_DYNAMIC_SCRIPTINTERPRETERS` is set, AddLLDB.cmake switches
all LLDB libraries to `CXX_VISIBILITY_PRESET=default` so that the
version script can re-export private symbols needed by dynamically
loaded plugins. The Python plugin calls `HostInfo::GetShlibDir()`
directly, so extract-dynamic-script-interpreter-exports.py adds
`HostInfoBase::GetShlibDir` to liblldb.so's exports (global: in the
version script). `HostInfoBase::Initialize()` is not called by the
plugin and stays local:.

At runtime the dynamic linker resolves liblldb.so's PLT entry for

    [22 lines not shown]
DeltaFile
+11-0lldb/tools/driver/CMakeLists.txt
+11-01 files

LLVM/project 2018896llvm/test/Transforms/Coroutines coro-split-musttail.ll coro-split-musttail1.ll, llvm/test/Transforms/GVN/PRE no-scalar-pre.ll

[Transforms] Remove redundant --check-prefix flags (#206211)

--check-prefix=CHECK is completely redundant, so remove it.

Change was generated by Gemini, I manually reviewed the entire diff.
DeltaFile
+2-2llvm/test/Transforms/GVN/PRE/no-scalar-pre.ll
+2-2llvm/test/Transforms/VectorCombine/X86/scalarize-vector-gep.ll
+2-2llvm/test/Transforms/Coroutines/coro-split-musttail.ll
+2-2llvm/test/Transforms/Coroutines/coro-split-musttail1.ll
+2-2llvm/test/Transforms/Coroutines/coro-split-musttail3.ll
+2-2llvm/test/Transforms/SROA/scalable-vector-struct.ll
+12-1252 files not shown
+64-6458 files