LLVM/project 98925a0lldb/source/Plugins/Language/CPlusPlus LibStdcppUniquePointer.cpp

[lldb] Fix crash in lldb when unique pointer is not valid (#175737)

check if the internal pointer is not null.
DeltaFile
+4-2lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp
+4-21 files

LLVM/project bf260afllvm/test/tools/llvm-exegesis/AArch64 setReg_init_check.s

[llvm-exegesis] Fix non-existent lit substitution in setReg_init_check.s (#175547)

According to [1] there is no '%d' substitution. Not sure if it was
intended as a substitution but it's confusing, so I've updated the test
to dump the object file to '%t.o', i.e.:

  <build_dir>/test/tools/llvm-exegesis/AArch64/Output/setReg_init_check.s.tmp.o

[1] https://llvm.org/docs/CommandGuide/lit.html#substitutions
DeltaFile
+36-36llvm/test/tools/llvm-exegesis/AArch64/setReg_init_check.s
+36-361 files

LLVM/project 3d418e5.github/workflows ids-check.yml

ids-check: Specify path input for `changed-files` (#175723)

This was causing issues when running the workflow.

https://github.com/llvm/llvm-project/actions/runs/20948190719/job/60195336123
DeltaFile
+1-0.github/workflows/ids-check.yml
+1-01 files

LLVM/project 75006cdllvm/test/MC/AMDGPU gfx12_asm_vop3-fake16.s gfx11_asm_vop3-fake16.s

[AMDGPU] Generate checks for *_asm_vop3-fake16.s
DeltaFile
+2,555-2,554llvm/test/MC/AMDGPU/gfx12_asm_vop3-fake16.s
+2,196-2,195llvm/test/MC/AMDGPU/gfx11_asm_vop3-fake16.s
+4,751-4,7492 files

LLVM/project 5cbd2f1llvm/test/CodeGen/X86 masked_gather.ll

[X86] masked_gather.ll - add mask from scalar value and test coverage for "fast-gather" avx2 targets (#175736)

Test coverage to help #175385
DeltaFile
+1,703-815llvm/test/CodeGen/X86/masked_gather.ll
+1,703-8151 files

LLVM/project 055174allvm/lib/Target/AMDGPU AMDGPURegBankLegalizeHelper.cpp AMDGPUGlobalISelUtils.cpp, llvm/test/CodeGen/AMDGPU/GlobalISel fpext.ll unmerge-sgpr-s16.ll

AMDGPU/GlobalISel: Regbanklegalize rules for G_UNMERGE_VALUES

Move G_UNMERGE_VALUES handling to AMDGPURegBankLegalizeRules.cpp.
Fix sgpr S16 unmerge by lowering using shift and using S32.
Previously sgpr S16 unmerge was selected using _lo16 and _hi16 subreg
indexes which are exclusive to vgpr register classes.
For remaing cases we do trivial mapping, assigns same reg bank
to all operands, vgpr or sgpr.
DeltaFile
+47-0llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeHelper.cpp
+13-27llvm/test/CodeGen/AMDGPU/GlobalISel/fpext.ll
+36-0llvm/test/CodeGen/AMDGPU/GlobalISel/unmerge-sgpr-s16.ll
+18-0llvm/lib/Target/AMDGPU/AMDGPUGlobalISelUtils.cpp
+10-0llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp
+6-1llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.h
+130-282 files not shown
+137-318 files

LLVM/project 8246257llvm/lib/Transforms/Vectorize VectorCombine.cpp, llvm/test/Transforms/VectorCombine/AMDGPU combine-scalar-selects.ll

Reapply "[VectorCombine] Fold scalar selects from bitcast into vector select" (#174762)

Reapply https://github.com/llvm/llvm-project/pull/173990 with fixes for
post-commit review comments.

---------

Co-authored-by: padivedi <padivedi at amd.com>
Co-authored-by: Christudasan Devadasan <christudasan.devadasan at amd.com>
DeltaFile
+1,874-0llvm/test/Transforms/VectorCombine/AMDGPU/combine-scalar-selects.ll
+130-0llvm/lib/Transforms/Vectorize/VectorCombine.cpp
+2,004-02 files

LLVM/project fc4273fcross-project-tests/debuginfo-tests/llvm-prettyprinters/lldb pointer-union.cpp pointer-union.test

[cross-project-tests][formatters] Add test for printing dynamic pointer type in llvm::PointerUnion

Make sure we show the concrete type of the pointer.
DeltaFile
+17-0cross-project-tests/debuginfo-tests/llvm-prettyprinters/lldb/pointer-union.cpp
+17-0cross-project-tests/debuginfo-tests/llvm-prettyprinters/lldb/pointer-union.test
+34-02 files

LLVM/project ed36bffllvm/lib/Transforms/Scalar SeparateConstOffsetFromGEP.cpp, llvm/test/Transforms/SeparateConstOffsetFromGEP negative-i32-offset.ll

[SeparateConstOffsetFromGEP] Perform offset calculations on APInt (#175732)

In general, GEP offset calculations are allowed to overflow (if no
poison flags are set). Using int64_t for this purpose can result in C
level signed integer overflow, which is UB. It also means that we
incorrectly model whether some offsets are zero, and thus generate
redundant zero-index GEPs.

Change the code to track offsets in APInts of the pointer index size,
like we do in other places (like accumulateConstantOffset etc).
DeltaFile
+33-32llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
+2-4llvm/test/Transforms/SeparateConstOffsetFromGEP/negative-i32-offset.ll
+35-362 files

LLVM/project 1562161mlir/include/mlir/Interfaces LoopLikeInterface.td, mlir/lib/Dialect/Arith/Transforms IntRangeOptimizations.cpp

[mlir] IntRangeNarrowing: Narrow loop induction variables. (#175455)

There are 2 parts:
* Update `LoopLikeOpInterface` to check the supported induction var type
and to update the loop bounds.
* Implement `NarrowLoopBounds` pattern which tries to narrow loop
induction var and bounds using this new interface.
DeltaFile
+191-2mlir/lib/Dialect/Arith/Transforms/IntRangeOptimizations.cpp
+51-11mlir/test/Dialect/Arith/int-range-narrowing.mlir
+48-0mlir/include/mlir/Interfaces/LoopLikeInterface.td
+34-0mlir/lib/Dialect/SCF/IR/SCF.cpp
+13-0mlir/test/Dialect/SCF/invalid.mlir
+11-0mlir/lib/Interfaces/LoopLikeInterface.cpp
+348-133 files not shown
+357-149 files

LLVM/project 5cc742ellvm/test/MC/AMDGPU gfx12_asm_vop3p_features.s gfx11_asm_vop3p_features.s

[AMDGPU] Generate checks for some MC features tests

The update script removes some empty "//" comment lines in these files.
DeltaFile
+17-24llvm/test/MC/AMDGPU/gfx12_asm_vop3p_features.s
+17-24llvm/test/MC/AMDGPU/gfx11_asm_vop3p_features.s
+14-15llvm/test/MC/AMDGPU/gfx1150_asm_features-fake16.s
+48-633 files

LLVM/project f0028f8llvm/test/MC/AMDGPU writelane_m0.s

[AMDGPU] Generate checks for writelane_m0.s
DeltaFile
+8-9llvm/test/MC/AMDGPU/writelane_m0.s
+8-91 files

LLVM/project bc057afllvm/test/MC/AMDGPU reg-syntax-extra.s

[AMDGPU] Generate checks for reg-syntax-extra.s

This just required tweaking a check prefix.
DeltaFile
+85-88llvm/test/MC/AMDGPU/reg-syntax-extra.s
+85-881 files

LLVM/project f0054a4libcxx/include __config, libcxx/src new.cpp verbose_abort.cpp

[libc++] Replace uses of _LIBCPP_WEAK with [[gnu::weak]] (#171798)

Using `_LIBCPP_WEAK` doesn't give us anything that using `[[gnu::weak]]`
directly couldn't, so we can just expand the macro.
As a drive-by this also refactors `_LIBCPP_OVERRIDABLE_FUNCTION`.
DeltaFile
+16-20libcxxabi/src/stdlib_new_delete.cpp
+16-16libcxx/src/new.cpp
+3-4libcxx/src/include/overridable_function.h
+0-4libcxx/include/__config
+1-1libcxx/src/experimental/tzdb.cpp
+1-1libcxx/src/verbose_abort.cpp
+37-461 files not shown
+37-477 files

LLVM/project 05a82ff.github/workflows release-tasks.yml, llvm/utils/release github-upload-release.py

[llvm][release] Reveal download links based on uploaded assets (#167688)

For the 21.x release, download links were supposed to be revealed once
all the release builds had completed successfully. In reality, MacOS
never had a successful build so I had to hand edit the release messages.
This PR fixes this by focusing instead on what is in the release assets
after the release build step has finished (in whatever state that might
be).

1. Links are now built from a format string, with the linked files being
format arguments for that string. This is a balance between ease of
editing the format, and having the file names for use later (I tried
regex-ing file names out of the final links, which can work but is error
prone and will be hard to debug in production).

Here's an example line:
```
  <!-- LINUX_X86 * [Linux x86_64](https://github.com/llvm/llvm-project/releases/download/llvmorg-vX.Y.Z-1/LLVM-vX.Y.Z-1-Linux-X64.tar.xz) ([signature](https://github.com/llvm/llvm-project/releases/download/llvmorg-vX.Y.Z-1/LLVM-vX.Y.Z-1-Linux-X64.tar.xz.jsonl)) -->
```

    [24 lines not shown]
DeltaFile
+161-41llvm/utils/release/github-upload-release.py
+1-2.github/workflows/release-tasks.yml
+162-432 files

LLVM/project 56b2722llvm/lib/Target/RISCV RISCVInstrInfoP.td RISCVISelLowering.cpp, llvm/test/CodeGen/RISCV rvp-ext-rv64.ll rvp-ext-rv32.ll

[RISCV][llvm] Support min/max codegen for P extension (#175494)

DeltaFile
+181-0llvm/test/CodeGen/RISCV/rvp-ext-rv64.ll
+121-0llvm/test/CodeGen/RISCV/rvp-ext-rv32.ll
+16-0llvm/lib/Target/RISCV/RISCVInstrInfoP.td
+2-0llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+320-04 files

LLVM/project 1340ff4llvm/lib/CodeGen Analysis.cpp, llvm/test/CodeGen/AArch64 seh-unreachable-loop.mir

[SEH] Ensure unreachable blocks are placed in EHScopeMembership (#175550)

The tests function has an unreachable block bb.2 leading to an
unreachable infinite loop bb.3. As BlockFolding removes the unreachable
bb.2, bb.3 is left only referencing itself. This block is then not
marked as unreachable and so left out of EHScopeMembership, leading to
an assert that FallThroughEHScope != EHScopeMembership.end(). This patch
makes sure that blocks not otherwise collected are added to
EHScopeMembership in the same way as unreachable blocks.
DeltaFile
+154-0llvm/test/CodeGen/AArch64/seh-unreachable-loop.mir
+8-0llvm/lib/CodeGen/Analysis.cpp
+162-02 files

LLVM/project 4528fc9lldb/source/Plugins/TypeSystem/Clang TypeSystemClang.cpp, lldb/test/API/python_api/sbtype_basic_type TestSBTypeBasicType.py

[lldb] Make sure that the "TypeSystemClang::GetBuiltinTypeByName" method returns the correct value also for "_BitInt(...)" types. (#165857)

When trying to get the `SBType` object corresponding to the
`_BitInt(...)` type name, we have noticed that the
`SBTarget::FindFirstType` metod returns `nil`. This branch proposes:
- some test that demonstrate that the problem exists
- a possible fix

---------

Co-authored-by: Matej Košík <matej.kosik at codasip.com>
Co-authored-by: Michael Buch <michaelbuch12 at gmail.com>
DeltaFile
+16-0lldb/test/API/python_api/sbtype_basic_type/TestSBTypeBasicType.py
+15-0lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+31-02 files

LLVM/project 9b377fbclang/include/clang/Analysis/Analyses/LifetimeSafety LifetimeAnnotations.h, clang/lib/Analysis/LifetimeSafety LifetimeAnnotations.cpp

[LifetimeSafety] Merge lifetimebound attribute on implicit 'this' across method redeclarations (#172146)

Followup on https://github.com/llvm/llvm-project/pull/107627  
Fixes https://github.com/llvm/llvm-project/issues/62072  
Fixes https://github.com/llvm/llvm-project/issues/172013
Fixes https://github.com/llvm/llvm-project/issues/175391

This PR adds support for merging the `lifetimebound` attribute on the implicit `this` parameter when merging method declarations. Previously, if a method was declared with `lifetimebound` on its function type (which represents the implicit `this` parameter), this attribute would not be propagated to the method definition, causing lifetime safety warnings to be missed.

The implementation adds helper functions to extract the `lifetimebound` attribute from a function type and to merge this attribute from an old method declaration to a new one when appropriate.
DeltaFile
+138-0clang/test/Sema/warn-lifetime-analysis-nocfg.cpp
+40-6clang/lib/Sema/SemaDecl.cpp
+17-12clang/lib/Analysis/LifetimeSafety/LifetimeAnnotations.cpp
+22-0clang/test/Sema/warn-lifetime-safety.cpp
+21-0clang/test/SemaCXX/attr-lifetimebound.cpp
+7-0clang/include/clang/Analysis/Analyses/LifetimeSafety/LifetimeAnnotations.h
+245-186 files

LLVM/project 91c701dlldb/include/lldb/Target Platform.h, lldb/source/Plugins/ABI/RISCV ABISysV_riscv.cpp

[lldb][RISCV] Implement trap handler unwind plan (#166531)

This patch introduces special unwind plan for trap handling for RISC-V
and fixes `TestHandleAbort`
DeltaFile
+87-4lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
+4-4lldb/include/lldb/Target/Platform.h
+2-3lldb/source/Plugins/Platform/AIX/PlatformAIX.cpp
+4-0lldb/source/Plugins/ABI/RISCV/ABISysV_riscv.cpp
+2-2lldb/source/Target/RegisterContextUnwind.cpp
+1-1lldb/source/Plugins/Platform/Linux/PlatformLinux.h
+100-141 files not shown
+101-157 files

LLVM/project fa656d9clang/lib/AST/ByteCode Compiler.cpp, clang/test/AST/ByteCode cxx11.cpp

[clang][bytecode] Diagnose regular CK_LValueBitCast cast nodes (#175721)

We already do this similarly for CXXReinterpretCastExprs, except in that
case we try harder to make things work.
DeltaFile
+4-0clang/test/AST/ByteCode/cxx11.cpp
+3-0clang/lib/AST/ByteCode/Compiler.cpp
+7-02 files

LLVM/project c4bec64llvm/lib/CodeGen TwoAddressInstructionPass.cpp

[TwoAddressInstruction] Track MadeChange when eliminating REG_SEQUENCE (#173535)

When `eliminateRegSequence()` is called, the pass modifies the
`MachineFunction` but `MadeChange` was not being set to true.
This causes the pass to incorrectly return `PreservedAnalyses::all()`
even though changes were made.
DeltaFile
+3-1llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
+3-11 files

LLVM/project cc4b572llvm/lib/CodeGen MachineBasicBlock.cpp, llvm/lib/CodeGen/MIRParser MIParser.cpp MILexer.h

[MIR] Add parsing for ehscope_entry. (#175592)

This makes sure that IsEHScopeEntry is written and can be re-parsed.
DeltaFile
+16-0llvm/test/CodeGen/MIR/Generic/machine-basic-block-ehscope-entry.mir
+6-0llvm/lib/CodeGen/MIRParser/MIParser.cpp
+5-0llvm/lib/CodeGen/MachineBasicBlock.cpp
+1-0llvm/lib/CodeGen/MIRParser/MILexer.h
+1-0llvm/lib/CodeGen/MIRParser/MILexer.cpp
+29-05 files

LLVM/project 88790eeclang/test/Sema constexpr.c

[Clang] add long double test to cover constant expression evaluation (#175645)

Fixes
https://github.com/llvm/llvm-project/pull/174113#discussion_r2683013358

--- 

This patch adds a test to cover the `long double` case during constant
expression evaluation
DeltaFile
+10-3clang/test/Sema/constexpr.c
+10-31 files

LLVM/project 12f970aclang/lib/Analysis/LifetimeSafety FactsGenerator.cpp, clang/unittests/Analysis LifetimeSafetyTest.cpp

[LifetimeSafety] Add support for derived-to-base conversions (#175631)

Add support for derived-to-base conversions in lifetime analysis.

Added handling for `CK_UncheckedDerivedToBase` and `CK_DerivedToBase` cast kinds in the `FactsGenerator::VisitImplicitCastExpr` method. These cast kinds are now treated similarly to other conversions by flowing origins from source to destination.

Added a unit test `DerivedToBaseThisArg` that verifies lifetime information is correctly propagated through derived-to-base conversions when using member functions inherited from a base class.
DeltaFile
+23-0clang/unittests/Analysis/LifetimeSafetyTest.cpp
+2-0clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp
+25-02 files

LLVM/project afcbb8bllvm/lib/Target/RISCV RISCVInstrInfoP.td

[RISCV] Sync Inst{30-27} assignment into RVPWideningBase. NFC (#175705)

2 of the 3 subclases can pass 'f' straight through from their
instantiations. The third case just needs to concatenate 1b1 to widen f
to 4 bits.
DeltaFile
+8-14llvm/lib/Target/RISCV/RISCVInstrInfoP.td
+8-141 files

LLVM/project 1e72f29llvm/utils/gn/secondary/libcxx/include BUILD.gn

[gn build] Port 6189512f73a3
DeltaFile
+1-1llvm/utils/gn/secondary/libcxx/include/BUILD.gn
+1-11 files

LLVM/project 6189512libcxx/include CMakeLists.txt streambuf, libcxx/include/__algorithm find_if.h

[libc++] Optimize std::find_if (#167697)

```
Benchmark                       4ecfaa602f56    80d5ac247d34    Difference    % Difference
----------------------------  --------------  --------------  ------------  --------------
bm_find_if_autovectorization         1901.51          306.12      -1595.39         -83.90%
```
DeltaFile
+74-0libcxx/include/__memory/valid_range.h
+0-37libcxx/include/__utility/is_valid_range.h
+4-16libcxx/test/benchmarks/algorithms/nonmodifying/find.bench.cpp
+3-0libcxx/include/__algorithm/find_if.h
+1-1libcxx/include/CMakeLists.txt
+1-1libcxx/include/streambuf
+83-553 files not shown
+86-589 files

LLVM/project e259175mlir/lib/Conversion/SCFToOpenMP SCFToOpenMP.cpp, mlir/test/Conversion/SCFToOpenMP vector-reduction.mlir

[MLIR][SCFToOpenMP] Fix crash when lowering vector reductions (#173978)

This patch fixes a crash in the SCF to OpenMP conversion pass when
encountering scf.parallel with vector reductions.

- Extracts scalar element types for bitwidth calculations.
- Uses DenseElementsAttr for vector splat initializers.
- Bypasses llvm.atomicrmw for vector types (not supported in LLVM IR).

Fixes #173860

---------

Co-authored-by: Aniket Singh <amiket.singh.3200.00 at gmail.com>
DeltaFile
+113-64mlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp
+29-0mlir/test/Conversion/SCFToOpenMP/vector-reduction.mlir
+142-642 files

LLVM/project 85bab68llvm/lib/Transforms/Vectorize VectorCombine.cpp

Update VectorCombine.cpp

Co-authored-by: Christudasan Devadasan <christudasan.devadasan at amd.com>
DeltaFile
+2-2llvm/lib/Transforms/Vectorize/VectorCombine.cpp
+2-21 files