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

[SeparateConstOffsetFromGEP] Allow truncation of offset

It's okay if the offset calculation overflows and we have to
truncate.

However, this should really be doing all the offset calculations on
correctly-sized APInts. For the case where the overflow occurs
on 64-bit indices, this would trigger signed integer overflow UB.

Fixes issue reported at:
https://github.com/llvm/llvm-project/pull/171456#issuecomment-3741522625
DeltaFile
+29-0llvm/test/Transforms/SeparateConstOffsetFromGEP/negative-i32-offset.ll
+5-1llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
+34-12 files

LLVM/project b6131f3libcxx/test/benchmarks/containers/associative associative_container_benchmarks.h

[libc++] Remove empty container benchmarks that are meaningless from the associative containers (#175180)

We generally try to benchmark the empty container case in the
associcative containers, since there are some case where we previously
ran calculations for significant amounts of time, even though they were
really not needed. However, there are some benchmarks where trying to
run with an empty container doesn't make sense (e.g. when benchmarking
collisions). We've worked around this a bit in the benchmarks by not
actually benchmarking the empty case. This patch removes these
meaningless benchmarks instead to speed up running the benchmarks.
DeltaFile
+17-14libcxx/test/benchmarks/containers/associative/associative_container_benchmarks.h
+17-141 files

LLVM/project be08890libcxx/include/__flat_map flat_multimap.h, libcxx/include/__flat_set flat_multiset.h

[libc++][NFC] Remove unused __key_equiv from flat_multimap and flat_multiset (#175612)

DeltaFile
+0-9libcxx/include/__flat_set/flat_multiset.h
+0-9libcxx/include/__flat_map/flat_multimap.h
+0-182 files

LLVM/project 8b51859libcxx/include/__filesystem path.h, libcxx/test/libcxx/input.output/filesystems/class.path lifetimebound.verify.cpp

[libc++] Annotate filesystem::path with [[clang::lifetimebound]] (#175507)

Fixes #175379
DeltaFile
+39-0libcxx/test/libcxx/input.output/filesystems/class.path/lifetimebound.verify.cpp
+17-15libcxx/include/__filesystem/path.h
+56-152 files

LLVM/project bd6bfbacmake/Modules LLVMVersion.cmake, libcxx/include __config

Bump version to 23.0.0-git
DeltaFile
+1-1libcxx/include/__config
+1-1llvm/utils/gn/secondary/llvm/version.gni
+1-1llvm/utils/mlgo-utils/mlgo/__init__.py
+1-1llvm/utils/lit/lit/__init__.py
+1-1cmake/Modules/LLVMVersion.cmake
+5-55 files

LLVM/project 752d7f5clang-tools-extra/docs ReleaseNotes.rst, clang/docs ReleaseNotes.rst

Clear release notes
DeltaFile
+3-798clang/docs/ReleaseNotes.rst
+0-659clang-tools-extra/docs/ReleaseNotes.rst
+6-179llvm/docs/ReleaseNotes.md
+0-22lld/docs/ReleaseNotes.rst
+3-7flang/docs/ReleaseNotes.md
+12-1,6655 files

LLVM/project 1546138llvm/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 822a45f.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 38c1953clang/docs ReleaseNotes.rst, clang/include/clang/Basic DiagnosticDriverKinds.td

[LoongArch][Driver] Allow `-gsplit-dwarf` and `-mrelax` to be used together

Benefit from https://github.com/llvm/llvm-project/pull/166597 and
https://github.com/llvm/llvm-project/pull/164813, DWARF fission is
now compatible with linker relaxation.

Similar to RISC-V, this commit allows `-gsplit-dwarf` and `-mrelax`
to be used together.

A new test `relax_dwo_ranges.ll` same as RISC-V is also added.
DeltaFile
+206-0llvm/test/DebugInfo/LoongArch/relax_dwo_ranges.ll
+0-12clang/test/Driver/loongarch-relax-features.c
+2-9clang/lib/Driver/ToolChains/Arch/LoongArch.cpp
+3-0llvm/docs/ReleaseNotes.md
+3-0clang/docs/ReleaseNotes.rst
+0-3clang/include/clang/Basic/DiagnosticDriverKinds.td
+214-246 files

LLVM/project 3d772bfcmake/Modules LLVMVersion.cmake, libcxx/include __config

Bump version to 22.1.0-git
DeltaFile
+1-1cmake/Modules/LLVMVersion.cmake
+1-1libcxx/include/__config
+1-1llvm/utils/gn/secondary/llvm/version.gni
+1-1llvm/utils/lit/lit/__init__.py
+1-1llvm/utils/mlgo-utils/mlgo/__init__.py
+5-55 files

LLVM/project 85c3c83llvm/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 7064312llvm/include/llvm/ExecutionEngine/JITLink loongarch.h, llvm/lib/ExecutionEngine/JITLink ELF_loongarch.cpp loongarch.cpp

Merge branch 'users/hev/loong32-jitlink-stub' into users/hev/loong32-pcadd
DeltaFile
+12-12llvm/include/llvm/ExecutionEngine/JITLink/loongarch.h
+11-11llvm/lib/ExecutionEngine/JITLink/ELF_loongarch.cpp
+3-3llvm/lib/ExecutionEngine/JITLink/loongarch.cpp
+2-2llvm/unittests/ExecutionEngine/JITLink/StubsTests.cpp
+28-284 files

LLVM/project 859750cllvm/include/llvm/ExecutionEngine/JITLink loongarch.h, llvm/unittests/ExecutionEngine/JITLink StubsTests.cpp

Rename PCAdd{20,12} to PCAdd{Hi20,Lo12}
DeltaFile
+4-4llvm/include/llvm/ExecutionEngine/JITLink/loongarch.h
+2-2llvm/unittests/ExecutionEngine/JITLink/StubsTests.cpp
+6-62 files

LLVM/project 8aa9c71lldb/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 2cce4a6llvm/include/llvm/ExecutionEngine/JITLink loongarch.h, llvm/lib/ExecutionEngine/JITLink ELF_loongarch.cpp loongarch.cpp

Merge branch 'users/hev/loong32-jitlink-relocs' into users/hev/loong32-jitlink-stub
DeltaFile
+11-11llvm/lib/ExecutionEngine/JITLink/ELF_loongarch.cpp
+8-8llvm/include/llvm/ExecutionEngine/JITLink/loongarch.h
+3-3llvm/lib/ExecutionEngine/JITLink/loongarch.cpp
+22-223 files

LLVM/project 4ef3f8dllvm/lib/CodeGen MachineBasicBlock.cpp, llvm/lib/CodeGen/MIRParser MIParser.cpp MILexer.cpp

[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.cpp
+1-0llvm/lib/CodeGen/MIRParser/MILexer.h
+29-05 files

LLVM/project 9339d41llvm/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 b0445a1clang/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 ef90ba6clang/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 f8d0108llvm/lib/ExecutionEngine/JITLink ELF_loongarch.cpp

Fix call30 linking
DeltaFile
+1-1llvm/lib/ExecutionEngine/JITLink/ELF_loongarch.cpp
+1-11 files

LLVM/project e884a44lldb/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/AIX/PlatformAIX.h
+100-141 files not shown
+101-157 files

LLVM/project 620e479llvm/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 7946fb5llvm/test/MC/LoongArch/Macros macros-call.s

Add la32-specific tests
DeltaFile
+35-20llvm/test/MC/LoongArch/Macros/macros-call.s
+35-201 files

LLVM/project b598dcbclang/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 b685bf0clang/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 e9f758allvm/lib/Transforms/Vectorize VPlanVerifier.cpp, llvm/test/Transforms/LoopVectorize/RISCV pointer-induction-rv32.ll

[VPlan] Allow VPInstruction::PtrAdd as a user of EVL (#175506)

Fixes #175058

Similar to #175028, on RV64 we insert a zext in between most uses of EVL
so most of the VPlanVerifier EVL checks don't fire unless we're
compiling for RV32.
In this case, we're experiencing a crash because we can have a PtrAdd
that uses EVL. This fixes it by adding PtrAdd to the list of allowed
instructions
DeltaFile
+47-0llvm/test/Transforms/LoopVectorize/RISCV/pointer-induction-rv32.ll
+1-0llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp
+48-02 files

LLVM/project afd7d13clang/lib/AST/ByteCode Program.cpp, clang/test/AST/ByteCode codegen.cpp

[clang][bytecode] Fix crash on arrays with excessive size (#175402)

The bytecode interpreter was crashing when seeing arrays with sizes that
exceed Descriptor::MaxArrayElemBytes. The bounds check in
Program::createDescriptor was using std::numeric_limits<unsigned>::max()
instead of the correct limit Descriptor::MaxArrayElemBytes.

This caused the check to pass for sizes that would later fail the
assertion in the Descriptor constructor.

Fixes #175293
DeltaFile
+4-0clang/test/AST/ByteCode/codegen.cpp
+1-1clang/lib/AST/ByteCode/Program.cpp
+5-12 files

LLVM/project e3156c5clang/lib/Basic/Targets RISCV.h, clang/test/CodeGen ext-int-cc.c

[RISCV] Support RISCV BitInt larger than 128 (#175515)

fa57074d146925a303263905af415cc78f58f353 constraint the RISCV BitInt
with 128 bits.

It is due to fp <-> int convension will crash in backend.
(https://godbolt.org/z/9o1qr4rje)

This patch enable larger than 128 bits BitInt type by
`setMaxLargeFPConvertBitWidthSupported`.
DeltaFile
+5,392-849llvm/test/CodeGen/RISCV/fpclamptosat.ll
+2,175-0llvm/test/CodeGen/RISCV/bitint-fp-conv-200.ll
+218-36clang/test/CodeGen/RISCV/bitint.c
+4-0clang/lib/Basic/Targets/RISCV.h
+0-2clang/test/CodeGen/ext-int-cc.c
+2-0llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+7,791-8876 files

LLVM/project 6cbf9ceclang/lib/AST/ByteCode Interp.h, clang/test/AST/ByteCode c.c

[clang][bytecode] Check for non-block pointers in CopyArray (#175710)

Fixes https://github.com/llvm/llvm-project/issues/175674
DeltaFile
+6-0clang/test/AST/ByteCode/c.c
+3-0clang/lib/AST/ByteCode/Interp.h
+9-02 files

LLVM/project 2b8b180llvm/test/ExecutionEngine/JITLink/LoongArch ELF_loongarch32_relocations.s

Add tests for JITLink
DeltaFile
+88-18llvm/test/ExecutionEngine/JITLink/LoongArch/ELF_loongarch32_relocations.s
+88-181 files