LLVM/project f91647allvm/utils/release test-release.sh

[llvm][release] Build openmp as runtime in test-release.sh (#212111)

`test_release.sh` tries to build `openmp` as a project, which breaks the
build:

```
CMake Error at CMakeLists.txt:155 (message):

  Support for the LLVM_ENABLE_PROJECTS=openmp build mode has been removed.
  Please switch to the bootstrapping build

      cmake -S <llvm-project>/llvm -B build -DLLVM_ENABLE_PROJECTS=clang -DLLVM_ENABLE_RUNTIMES=openmp

  or to the runtimes default build

      cmake -S <llvm-project>/runtimes -B build -DLLVM_ENABLE_RUNTIMES=openmp
```

This patch switches it to a runtime to match.

Tested on `x86_64-pc-linux-gnu`.
DeltaFile
+1-1llvm/utils/release/test-release.sh
+1-11 files

LLVM/project 102f572llvm/unittests/CAS OnDiskCASLoggerTest.cpp

[llvm][cas] Fix OnDiskCASLoggerTest.cpp compilation on NetBSD (#212113)

`CAS/OnDiskCASLoggerTest.cpp` doesn't compile on NetBSD/amd64:

```
In member function `virtual void OnDiskCASLoggerTest_MultiProcess_Test::TestBody()':
llvm/unittests/CAS/OnDiskCASLoggerTest.cpp:230:19: error: reference to `Wait' is ambiguous
  230 |     auto Result = Wait(PI, /*Timeout=*/15, &Error);
      |                   ^~~~
In file included from llvm/unittests/CAS/OnDiskCASLoggerTest.cpp:15:
llvm/include/llvm/Support/Program.h:212:22: note: candidates are: `llvm::sys::ProcessInfo llvm::sys::Wait(const llvm::sys::ProcessInfo&, std::optional<unsigned int>, std::string*, std::optional<llvm::sys::ProcessStatistics>*, bool)'
  212 | LLVM_ABI ProcessInfo Wait(
      |                      ^~~~
In file included from llvm/include/llvm/Support/RWMutex.h:17,
                 from llvm/include/llvm/Support/ThreadPool.h:21,
                 from llvm/unittests/CAS/OnDiskCASLoggerTest.cpp:16:
llvm/include/llvm/Support/Threading.h:60:40: note:                 `llvm::InitStatus llvm::Wait'
   60 |   enum InitStatus { Uninitialized = 0, Wait = 1, Done = 2 };
      |                                        ^~~~

    [4 lines not shown]
DeltaFile
+1-1llvm/unittests/CAS/OnDiskCASLoggerTest.cpp
+1-11 files

LLVM/project b66306cllvm/lib/CodeGen/SelectionDAG DAGCombiner.cpp SelectionDAGBuilder.cpp, llvm/test/CodeGen/AArch64 select_fmf.ll

[SelectionDAG] Stop forming minnum/maxnum in SDAGBuilder (#187738)

The right place to form these is DAGCombine, not SDAGBuilder. This
removes the SPNB_RETURNS_ANY case, the SPNB_RETURNS_OTHER is left to a
followup. We need to propagate FMF flags in a few more places to make
this work.
DeltaFile
+107-254llvm/test/CodeGen/AMDGPU/select-nsz-known-values-to-fmin-fmax.ll
+22-22llvm/test/CodeGen/AMDGPU/fmin_legacy.f16.ll
+22-22llvm/test/CodeGen/AMDGPU/fmax_legacy.f16.ll
+18-10llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+10-10llvm/test/CodeGen/AArch64/select_fmf.ll
+6-14llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+185-3323 files not shown
+191-3389 files

LLVM/project b46bcf4llvm/include/llvm/IR RuntimeLibcalls.td, llvm/lib/Target/MSP430 MSP430Subtarget.cpp

MSP430: Mark more generic libgcc functions as available (#210962)

The generic soft-float, conversion, comparison and integer helper
routines (__addsf3, __divli's __divsi3, __ashlsi3, ...) exist in the MSP430
libgcc port alongside the preferred __mspabi_* variants. They were previously
removed to force selection of the __mspabi_* names, back when only one
implementation per libcall could be recorded.

Stop hiding them: only __lshrsi3 stays excluded, since the MSP430 libgcc
port provides the 32-bit logical right shift solely under __mspabi_srll and
never defines a generic __lshrsi3.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+67-0llvm/lib/Target/MSP430/MSP430Subtarget.cpp
+4-11llvm/include/llvm/IR/RuntimeLibcalls.td
+71-112 files

LLVM/project 0cc7159compiler-rt/lib/sanitizer_common/tests sanitizer_procmaps_test.cpp

[sanitizer_common][tests] Skip MemoryMapping::ParseUnixMemoryProfile … (#212114)

…etc. on NetBSD

The `Sanitizer-x86_64-Test` test doesn't link on NetBSD/amd64 10.1:

```
/usr/bin/ld: /usr/bin/ld: DWARF error: invalid or unhandled FORM value: 0x25
SANITIZER_TEST_OBJECTS.sanitizer_procmaps_test.cpp.x86_64.o: in function `__sanitizer::MemoryMapping_ParseUnixMemoryProfile_Test::TestBody()':
sanitizer_procmaps_test.cpp:(.text._ZN11__sanitizer41MemoryMapping_ParseUnixMemoryProfile_Test8TestBodyEv+0x52): undefined reference to `__sanitizer::ParseUnixMemoryProfile(void (*)(unsigned long, unsigned long, bool, unsigned long*), unsigned long*, char*, unsigned long)'
/usr/bin/ld: SANITIZER_TEST_OBJECTS.sanitizer_procmaps_test.cpp.x86_64.o: in function `__sanitizer::MemoryMapping_ParseUnixMemoryProfileTruncated_Test::TestBody()':
sanitizer_procmaps_test.cpp:(.text._ZN11__sanitizer50MemoryMapping_ParseUnixMemoryProfileTruncated_Test8TestBodyEv+0x17a): undefined reference to `__sanitizer::ParseUnixMemoryProfile(void (*)(unsigned long, unsigned long, bool, unsigned long*), unsigned long*, char*, unsigned long)'

```

Fixed by skipping the affected subtest.

Tested on `amd64-pc-netbsd10.1` and `x86_64-pc-linux-gnu`.
DeltaFile
+3-0compiler-rt/lib/sanitizer_common/tests/sanitizer_procmaps_test.cpp
+3-01 files

LLVM/project 1fc03feclang/include/clang/Analysis/Analyses/LifetimeSafety Loans.h Facts.h, clang/lib/Analysis/LifetimeSafety LoanPropagation.cpp Facts.cpp

[LifetimeSafety] Support field-sensitivity in lifetime tracking

This patch enables field-sensitivity when tracking lifetimes of nested objects.

- FactsGenerator now generates `PathElement::getField` for `MemberExpr` accesses, mapping fields to loans.
- LoanPropagation now propagates field paths along flow facts, appending fields to base loans.
- Removes false-positive warnings in `invalidations.cpp` where modifications to one field were incorrectly reported as invalidating iterators/pointers to another field.
- Adds comprehensive unit tests checking nested field access and placeholder fields.

TAG=agy
CONV=2cfd8d00-18d7-4a03-8d78-2aba2f9a8f23
DeltaFile
+106-36clang/lib/Analysis/LifetimeSafety/LoanPropagation.cpp
+72-30clang/unittests/Analysis/LifetimeSafetyTest.cpp
+82-10clang/test/Sema/LifetimeSafety/invalidations.cpp
+29-0clang/include/clang/Analysis/Analyses/LifetimeSafety/Loans.h
+15-11clang/lib/Analysis/LifetimeSafety/Facts.cpp
+24-0clang/include/clang/Analysis/Analyses/LifetimeSafety/Facts.h
+328-874 files not shown
+362-9510 files

LLVM/project 5571300clang/lib/Analysis/LifetimeSafety Checker.cpp MovedLoans.cpp

[LifetimeSafety][NFC] Update Checker to use prefix comparison interfaces

This patch switches the Checker's expiry and invalidation checks to use `AccessPath::isPrefixOf` instead of equality (`==`).

Since all generated access paths are currently empty, `isPrefixOf` is behaviorally identical to `==` (NFC). This prepares the checker to handle nested paths (fields and container interiors) in subsequent commits.

TAG=agy
CONV=2cfd8d00-18d7-4a03-8d78-2aba2f9a8f23
DeltaFile
+3-3clang/lib/Analysis/LifetimeSafety/Checker.cpp
+1-1clang/lib/Analysis/LifetimeSafety/MovedLoans.cpp
+4-42 files

LLVM/project 5278addclang/lib/Analysis/LifetimeSafety FactsGenerator.cpp Loans.cpp, clang/test/Sema/LifetimeSafety invalidations.cpp

[LifetimeSafety] Support container interior paths and invalidations

This patch completes the implementation of path-sensitive lifetime tracking by supporting container interior paths (`.*`) and deep-nested invalidation.

- Enables `PathElement::getInterior` generation in `FactsGenerator` for GSL Owners and Views (e.g. member functions, function parameters, lambda captures).
- Removes bypass checks in `FactsGenerator::handleInvalidatingCall` to track container invalidation on fields.
- Updates `Checker` to use strict prefix comparison (`isStrictPrefixOf`) for container invalidations, ensuring invalidation of container contents (interior) correctly invalidates iterators but not other sibling fields.
- Reorganizes tests in `invalidations.cpp` by resolving duplicates and distributing them logically.
- Updates unit tests and sema tests with correct expectations for interior paths.

TAG=agy
CONV=2cfd8d00-18d7-4a03-8d78-2aba2f9a8f23
DeltaFile
+243-64clang/test/Sema/LifetimeSafety/invalidations.cpp
+228-67clang/unittests/Analysis/LifetimeSafetyTest.cpp
+30-10clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp
+9-4clang/test/Sema/LifetimeSafety/Inputs/lifetime-analysis.h
+12-0clang/lib/Analysis/LifetimeSafety/Loans.cpp
+9-2clang/lib/Analysis/LifetimeSafety/Checker.cpp
+531-1476 files

LLVM/project a4459a6clang/include/clang/Analysis/Analyses/LifetimeSafety Loans.h, clang/lib/Analysis/LifetimeSafety Loans.cpp Checker.cpp

[LifetimeSafety][NFC] Refactor AccessPath and Loan representations

This patch refactors the internal representations of `AccessPath` and `Loan` to support path elements, preparing for field-sensitive and interior-sensitive lifetime tracking.

- Introduces `PathElement` representing a field or interior dereference.
- Refactors `AccessPath` to contain a base and a list of `PathElement`s.
- Updates `Loan` and `LoanManager` to use the new `AccessPath` structure.
- Refactors debug dump formatting to output path elements if present.
- Updates Checker and FactsGenerator to compile with the new interfaces, keeping logic behaviorally identical (NFC).

TAG=agy
CONV=2cfd8d00-18d7-4a03-8d78-2aba2f9a8f23
DeltaFile
+156-70clang/include/clang/Analysis/Analyses/LifetimeSafety/Loans.h
+45-21clang/lib/Analysis/LifetimeSafety/Loans.cpp
+17-10clang/lib/Analysis/LifetimeSafety/Checker.cpp
+3-5clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp
+221-1064 files

LLVM/project ed3470flld/ELF Relocations.cpp

[ELF] Fix -Wc++11-narrowing error in addPltEntry (#212185)

PR #212161 passes the `uint8_t isPreemptible : 1` bit-field straight
into a braced-init-list slot whose parameter type is `bool`.
Older clang (<20 ?) incorrectly rejects it.

```
error: non-constant-expression cannot be narrowed from type 'uint8_t' (aka 'unsigned char') to 'bool' in initializer list [-Wc++11-narrowing]
```
DeltaFile
+5-4lld/ELF/Relocations.cpp
+5-41 files

LLVM/project 820b5cbllvm/lib/Target/AArch64 AArch64RegisterInfo.td, llvm/test/TableGen aarch64-register-info-stats.td

[AArch64] Mark ZT0 register class as non-allocatable (#211750)

ZT0 is not available for register allocation, define it with the other
non-allocatable SME register classes and avoid an unnecessary pressure
set.

Assisted-by: codex
DeltaFile
+5-4llvm/lib/Target/AArch64/AArch64RegisterInfo.td
+1-1llvm/test/TableGen/aarch64-register-info-stats.td
+6-52 files

LLVM/project 5271fd9orc-rt/include/orc-rt Session.h InProcessControllerAccess.h, orc-rt/include/orc-rt-c CoreTypes.h

[orc-rt] Session::HandlerTag -> orc_rt_ControllerHandlerTag (#212173)

Replace the `Session::HandlerTag = void*` type alias with
orc_rt_ControllerHandlerTag. The intent is both to make this type
accessible to the C API, and to rename it to clarify its role as a tag
for handlers in the controller that are callable by the executor.
DeltaFile
+7-11orc-rt/include/orc-rt/Session.h
+9-8orc-rt/test/unit/InProcessControllerAccessTest.cpp
+9-7orc-rt/test/unit/SessionTest.cpp
+5-2orc-rt/include/orc-rt/InProcessControllerAccess.h
+5-0orc-rt/include/orc-rt-c/CoreTypes.h
+1-1orc-rt/lib/executor/InProcessControllerAccess.cpp
+36-296 files

LLVM/project 13706f1llvm/test/CodeGen/MIR/AMDGPU machine-metadata-error.mir machine-metadata.mir

AMDGPU: Migrate misc. tests to subarch triples (#211585)
DeltaFile
+1-1llvm/test/CodeGen/MIR/AMDGPU/machine-metadata-error.mir
+0-1llvm/test/CodeGen/MIR/AMDGPU/machine-metadata.mir
+0-1llvm/test/CodeGen/MIR/AMDGPU/syncscopes.mir
+1-33 files

LLVM/project 8c57bdblldb/source/Plugins/ObjectFile/ELF ObjectFileELF.cpp, llvm/include/llvm/BinaryFormat DynamicTags.def

[X86] Add dynamic tags support for llvm-readobj and lldb per psABI (#207661)
DeltaFile
+46-0llvm/test/tools/llvm-readobj/ELF/dynamic-tags-machine-specific.test
+15-0llvm/include/llvm/BinaryFormat/DynamicTags.def
+10-0llvm/lib/Object/ELF.cpp
+10-0lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+81-04 files

LLVM/project 3f170b5mlir/lib/Conversion/ArithToLLVM ArithToLLVM.cpp

[mlir] Fix warning, NFC (#211204)
DeltaFile
+3-3mlir/lib/Conversion/ArithToLLVM/ArithToLLVM.cpp
+3-31 files

LLVM/project 89c0b16llvm/include/llvm/IR Dominators.h, llvm/include/llvm/Support GenericDomTreeConstruction.h GenericDomTree.h

[DomTree] Define the members calling the construction algorithms out of line. NFC (#212145)

DominatorTreeBase defines some functions that call into into
DomTreeBuilder, whose algorithms live in GenericDomTreeConstruction.h.
A translation unit including only GenericDomTree.h inlines the member
and calls the algorithm, which just Dominators.cpp provides, through ten
explicit instantiations. Elsewhere the algorithm survives only where the
inliner leaves a use of it.

A previous revision of #212098 gave LoopInfoBase a member calling
recalculate, so instantiating LoopInfoBase in CFGLoopInfo.cpp referenced
an algorithm that no translation unit defines:

```
ld.lld: error: undefined symbol: void llvm::DomTreeBuilder::Calculate<llvm::DominatorTreeBase<mlir::Block, false>>(llvm::DominatorTreeBase<mlir::Block, false>&)
>>> referenced by CFGLoopInfo.cpp
```

Define those members in GenericDomTreeConstruction.h. Such a caller then

    [5 lines not shown]
DeltaFile
+70-0llvm/include/llvm/Support/GenericDomTreeConstruction.h
+7-50llvm/include/llvm/Support/GenericDomTree.h
+0-44llvm/lib/IR/Dominators.cpp
+0-29llvm/include/llvm/IR/Dominators.h
+7-7llvm/unittests/Support/GenericDomTreeTest.cpp
+0-3llvm/lib/Transforms/Vectorize/VPlanAnalysis.cpp
+84-1336 files

LLVM/project 01b8b7clibc/src/stdlib/linux realpath.cpp CMakeLists.txt, libc/test/src/stdlib realpath_test.cpp CMakeLists.txt

[libc][realpath] Follow symlinks

This commit updates realpath to call readlinkat on symlinks during path resolution. In order to do, it updates `PendingPath` to store a `cpp::string` that is prepended with a symlink target when resolved. This could be more efficient by using a `PATH_MAX` buffer and storing the path at the end of the buffer, but using a `cpp::string` avoids the pointer arithmetic and manual memory management that comes with that approach.
DeltaFile
+111-34libc/src/stdlib/linux/realpath.cpp
+123-0libc/test/src/stdlib/realpath_test.cpp
+1-0libc/test/src/stdlib/CMakeLists.txt
+1-0libc/src/stdlib/linux/CMakeLists.txt
+236-344 files

LLVM/project c5e22f9libc/src/stdlib/linux realpath.cpp CMakeLists.txt, libc/test/src/stdlib realpath_test.cpp CMakeLists.txt

[libc][realpath] Follow symlinks

This commit updates realpath to call readlinkat on symlinks during path resolution. In order to do, it updates `PendingPath` to store a `cpp::string` that is prepended with a symlink target when resolved. This could be more efficient by using a `PATH_MAX` buffer and storing the path at the end of the buffer, but using a `cpp::string` avoids the pointer arithmetic and manual memory management that comes with that approach.
DeltaFile
+109-34libc/src/stdlib/linux/realpath.cpp
+123-0libc/test/src/stdlib/realpath_test.cpp
+1-0libc/src/stdlib/linux/CMakeLists.txt
+1-0libc/test/src/stdlib/CMakeLists.txt
+234-344 files

LLVM/project 517d15alibc/src/__support/CPP string.h CMakeLists.txt, libc/test/src/__support/CPP string_test.cpp

[libc][cpp::string] Implement replace
DeltaFile
+111-0libc/test/src/__support/CPP/string_test.cpp
+60-6libc/src/__support/CPP/string.h
+3-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+3-0libc/src/__support/CPP/CMakeLists.txt
+177-64 files

LLVM/project 9349673mlir/lib/Dialect/Arith/IR ArithOps.cpp, mlir/test/Conversion/ArithToLLVM arith-to-llvm.mlir

[mlir][arith] Fold trivial shifts (`0<<x`, `x>>x`, `-1>>x`) (#212159)

Add value-preserving folds mirroring LLVM's InstructionSimplify for the
integer shift ops:

```
shli/shrui/shrsi(0, x) -> 0
shrui/shrsi(x, x) -> 0
shrsi(-1, x) -> -1
```

A shift amount greater than or equal to the bit width yields poison, so
refining these cases to a constant is valid. For `shr(x, x)` any
in-range amount `v` satisfies `v >> v == 0 (v < 2^v)`.

Folding an out-of-range shift amount (`c >= bit width`) to poison is
left as a TODO: it would make the arith dialect depend on the ub dialect
to materialize `ub.poison`.


    [17 lines not shown]
DeltaFile
+62-0mlir/test/Dialect/Arith/canonicalize.mlir
+40-0mlir/lib/Dialect/Arith/IR/ArithOps.cpp
+4-4mlir/test/Conversion/ArithToLLVM/arith-to-llvm.mlir
+106-43 files

LLVM/project 19cdc69llvm/lib/Target/RISCV RISCVInstrInfo.td, llvm/test/CodeGen/RISCV tlsdesc-clobber-vector.ll tlsdesc-clobber.ll

[RISCV] Declare TLSDESC clobbers for vector registers and CSRs per psABI (#205027)

RISC-V's ABI states that, aside from V extension state, only a0 and t0
are clobbered by TLSDESC resolvers. The original specification was to
also not clobber any V extension state, but due to implementation
concerns an ABI-breaking change has been made[1] to clobber all V
extension state.

This patch adds V-regs/csrs clobbering to the existing PseudoLA_TLSDESC
and PseudoTLSDESCCall in RISCVInstrInfo.td, as well as an additional
test covering the V-register clobber and V-CSRs clobber cases.

[1] https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/496
DeltaFile
+393-0llvm/test/CodeGen/RISCV/tlsdesc-clobber-vector.ll
+6-2llvm/lib/Target/RISCV/RISCVInstrInfo.td
+4-0llvm/test/CodeGen/RISCV/tlsdesc-clobber.ll
+403-23 files

LLVM/project 8cb3598llvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll bf16.ll

rebase

Created using spr 1.3.7
DeltaFile
+6,560-6,119llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+4,715-4,955llvm/test/CodeGen/AMDGPU/bf16.ll
+2,967-2,753llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+2,002-1,834llvm/test/CodeGen/AMDGPU/maximumnum.bf16.ll
+2,002-1,834llvm/test/CodeGen/AMDGPU/minimumnum.bf16.ll
+1,072-1,937llvm/test/CodeGen/AMDGPU/flat-atomicrmw-fmax.ll
+19,318-19,4321,393 files not shown
+85,920-62,6581,399 files

LLVM/project b54678dllvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll bf16.ll

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+6,560-6,119llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+4,715-4,955llvm/test/CodeGen/AMDGPU/bf16.ll
+2,967-2,753llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+2,002-1,834llvm/test/CodeGen/AMDGPU/minimumnum.bf16.ll
+2,002-1,834llvm/test/CodeGen/AMDGPU/maximumnum.bf16.ll
+1,072-1,937llvm/test/CodeGen/AMDGPU/flat-atomicrmw-fmax.ll
+19,318-19,4321,393 files not shown
+85,920-62,6581,399 files

LLVM/project 1e13572llvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll bf16.ll

rebase

Created using spr 1.3.7
DeltaFile
+6,560-6,119llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+4,715-4,955llvm/test/CodeGen/AMDGPU/bf16.ll
+2,967-2,753llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+2,002-1,834llvm/test/CodeGen/AMDGPU/maximumnum.bf16.ll
+2,002-1,834llvm/test/CodeGen/AMDGPU/minimumnum.bf16.ll
+1,072-1,937llvm/test/CodeGen/AMDGPU/flat-atomicrmw-fsub.ll
+19,318-19,4321,393 files not shown
+85,920-62,6581,399 files

LLVM/project e235d08llvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll bf16.ll

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+6,560-6,119llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+4,715-4,955llvm/test/CodeGen/AMDGPU/bf16.ll
+2,967-2,753llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+2,002-1,834llvm/test/CodeGen/AMDGPU/maximumnum.bf16.ll
+2,002-1,834llvm/test/CodeGen/AMDGPU/minimumnum.bf16.ll
+1,072-1,937llvm/test/CodeGen/AMDGPU/flat-atomicrmw-fmin.ll
+19,318-19,4321,393 files not shown
+85,920-62,6581,399 files

LLVM/project 27bf172llvm/lib/Transforms/Coroutines CoroSplit.cpp, llvm/test/Transforms/Coroutines coro-split-00.ll

[profcheck][coro] Add Branch Weights in to select in replaceSwitchResumeCoroFree. (#211970)

The previous https://github.com/llvm/llvm-project/pull/184466 didn't fix
the PGO profile in select instruction in
[replaceSwitchResumeCoroFree](https://github.com/jinhuang1102/llvm-project/blob/98668ee1485aa47e97cbb900bc22e0d9e1c8d795/llvm/lib/Transforms/Coroutines/CoroSplit.cpp#L207)
function in `CoroSplit.cpp` so triggered a profile verification failure:
https://lab.llvm.org/buildbot/#/builders/223/builds/7899

This PR attach unknown branch weights to the created `select`
instruction see the comment for more information.

Cmake config:
```
cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DLLVM_ENABLE_ASSERTIONS=ON -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DLLVM_LIT_ARGS=--exclude-xfail -DLLVM_ENABLE_PROFCHECK=ON ../llvm-project/llvm
```

Verified by
```
$ bin/llvm-lit -v /usr/local/google/home/jingold/llvm-project/llvm/test/Transforms/Coroutines

    [15 lines not shown]
DeltaFile
+16-8llvm/test/Transforms/Coroutines/coro-split-00.ll
+6-0llvm/lib/Transforms/Coroutines/CoroSplit.cpp
+0-3llvm/utils/profcheck-xfail.txt
+22-113 files

LLVM/project 1bf43dclibc/src/stdlib/linux realpath.cpp CMakeLists.txt, libc/test/src/stdlib realpath_test.cpp CMakeLists.txt

[libc][realpath] Follow symlinks

This commit updates realpath to call readlinkat on symlinks during path resolution. In order to do, it updates `PendingPath` to store a `cpp::string` that is prepended with a symlink target when resolved. This could be more efficient by using a `PATH_MAX` buffer and storing the path at the end of the buffer, but using a `cpp::string` avoids the pointer arithmetic and manual memory management that comes with that approach.
DeltaFile
+109-34libc/src/stdlib/linux/realpath.cpp
+123-0libc/test/src/stdlib/realpath_test.cpp
+1-0libc/src/stdlib/linux/CMakeLists.txt
+1-0libc/test/src/stdlib/CMakeLists.txt
+234-344 files

LLVM/project 6e1a26clibc/src/__support/CPP string.h CMakeLists.txt, libc/test/src/__support/CPP string_test.cpp

[libc][cpp::string] Implement replace
DeltaFile
+101-0libc/test/src/__support/CPP/string_test.cpp
+59-6libc/src/__support/CPP/string.h
+2-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+2-0libc/src/__support/CPP/CMakeLists.txt
+164-64 files

LLVM/project 43a704blld/ELF Relocations.cpp Symbols.cpp, lld/ELF/Arch SPARCV9.cpp

[ELF,SPARC] Add the GOT header entry and place R_SPARC_JMP_SLOT in .plt (#212161)

SPARC dynamic linker finds _DYNAMIC by dereferencing the GOT pointer
register (glibc elf_machine_dynamic), so reserve .got[0] for it. It
resolves a PLT entry by rewriting the entry's instructions (glibc
sparc64_fixup_plt), so R_SPARC_JMP_SLOT applies to .plt and there is no
.got.plt.

Add TargetInfo::usesGotPlt, which SPARC sets to false, and use it to
place the relocation and derive the sh_info of .rela.plt. The four
reserved PLT entries stay zeroed, as with GNU ld; the dynamic linker
fills in .PLT0 and .PLT1 at startup.

Co-authored-by: Kirill A. Korinsky <kirill at korins.ky>
Co-authored-by: LemonBoy <thatlemon at gmail.com>
DeltaFile
+66-0lld/test/ELF/sparcv9-plt.s
+11-8lld/test/ELF/sparcv9-reloc-got.s
+8-6lld/ELF/Relocations.cpp
+8-4lld/ELF/Symbols.cpp
+8-3lld/ELF/SyntheticSections.cpp
+8-0lld/ELF/Arch/SPARCV9.cpp
+109-212 files not shown
+115-218 files

LLVM/project 90be9dclibc/src/stdlib/linux realpath.cpp CMakeLists.txt, libc/test/src/stdlib realpath_test.cpp CMakeLists.txt

[libc] Follow symlinks using replace
DeltaFile
+109-34libc/src/stdlib/linux/realpath.cpp
+123-0libc/test/src/stdlib/realpath_test.cpp
+1-0libc/src/stdlib/linux/CMakeLists.txt
+1-0libc/test/src/stdlib/CMakeLists.txt
+234-344 files