[SLP] Fix crash in ordered reduction with loop-carried chain root
tryToReduceOrdered built the buildTree ignore list only from the current
window's reduced values, omitting the chain root when its leaf is a
trailing scalar outside the window.
buildTree then vectorized the root through the phi cycle,
vectorizeTree unlinked it, and emitReduction inserted at the dangling
insertion point.
Build the ignore list from the full ReductionOps chain, matching the
associative-reduction path, so the root stays scalar to fix a crash.
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/201963
[libclc][Test] Don't hard code `clang` path in update_libclc_tests.py (#201806)
In #201773, build folder is `redhat-linux-build` rather than `build`.
Detect clang from PATH. Also add --clang-binary option to specify clang path.
[libclc][Test] Add -fno-discard-value-names to RUN line (#201808)
Entry block label could be missing. Add -fno-discard-value-names to make
sure it exists.
Resolves #201773
[libclc] Fix LIBCLC_OUTPUT_LIBRARY_DIR when find_package(LLVM) fails (#201816)
If we configure llvm from llvm-project/build folder, find_package(LLVM)
succeeds, `LLVM_LIBRARY_OUTPUT_INTDIR` is `build/./lib` and
`LLVM_BINARY_DIR` is `build`.
However, in #201773, find_package(LLVM) fails due to
LLVM_LIBDIR_SUFFIX=64, LLVM_LIBRARY_OUTPUT_INTDIR is
`redhat-linux-build/runtimes/runtimes-nvptx64-nvidia-cuda-bins/lib64`
and LLVM_BINARY_DIR is `redhat-linux-build`.
Use LLVM_BINARY_DIR, which is stable for both cases, for libclc output dir.
Fixes #201773
[libc] Fix clock_gettime on arm32 (#201959)
After removing 32 bit time_t the buildbot has been failing due to a
segfault. This PR fixes it. Not the cleanest fix but I don't want the
buildbot failing over the weekend.
Assisted-by: Automated tooling, human reviewed.
[clang][sycl][nvlink] Share static library linking in Frontend/Offloading (#201253)
Move clang-nvlink-wrapper's archive member selection engine into a new
shared library in llvm/lib/Frontend/Offloading (ArchiveLinker.h/.cpp)
and use it from both clang-nvlink-wrapper and clang-sycl-linker, adding
static library (.a) and -l support to the SYCL linker.
The shared llvm::offloading::resolveArchiveMembers() API:
- Searches -L paths for -l library names (lib<name>.a or :<name>)
- Expands archives, honouring --whole-archive/--no-whole-archive
- Runs a symbol-driven fixed-point loop to extract only the archive
members that resolve undefined symbols
- Returns the resolved MemoryBuffers and symbol table; the symbol table
is consumed by clang-nvlink-wrapper's LTO resolution pass
clang-sycl-linker gains -l, --whole-archive/--no-whole-archive, and -u
options (added to SYCLLinkOpts.td). The previous --bc-library option
has been removed in favor of the standard -l mechanism.
[11 lines not shown]
[X86] Fix crash on BT bit index narrower than log2(BW) (#201793)
peekThroughBitPosExtTrunc asserted that peeling
TRUNCATE/ZERO_EXTEND/ANY_EXTEND never drops below log2(BW) bits, but a
BT bit index can be e.g. a zext of i1. Stop peeking there instead: below
log2(BW) bits a peeled value no longer determines the bit index on its
own, so comparing peeled values would also be unsound.
Fixes #201444.
[docs] Migrate 20 LLVM docs to markdown (#201465)
An LLM assisted in the rewrite. I didn't use pandoc or any other tools,
and I think there are fewer artifacts. I validated these docs by opening
all 20 HTML files in my browser.
Files:
- DebuggingLLVM.md
- FAQ.md
- CompilerWriterInfo.md
- GettingStartedVS.md
- NewPassManager.md
- MemorySSA.md
- LoopTerminology.md
- Lexicon.md
- MIRLangRef.md
- CoverageMappingFormat.md
- InstrProfileFormat.md
- BitCodeFormat.md
[9 lines not shown]
[docs] Rename 20 key LLVM docs to Markdown (#201464)
This may break the docs build temporarily, but there will be a follow-up
PR that fixes it immediately after. The rename is being committed first
to aid review and source code archaelogy.
Tracking issue: #201242
[X86][GlobalISel] Adding missing Query to G_BUILD_VECTOR legalization (#199435)
Once G_BUILD_VECTOR was fixed, legalize-undef-vec-scaling.mir falled
into endless legalization loop as incoming MIR doesn't match correct
lowering of the type.
arti: update to 2.4.0.
# Arti 2.4.0 — 1 June 2026
Arti 2.4.0 continues our work on relay and directory authority development,
and brings us even closer to a working middle relay.
This release also includes a number of important
bug fixes in our onion service client implementation,
and a number of breaking changes in the `arti-client` APIs.
[SSAF][Extractor] Make hard errors in Extractors quiet
Hard errors were used in extractors during development to quickly
identify unsupported language constructs. This commit converts them to
DEBUG_WITH_TYPE so that these errors are silenced in release builds.
rdar://178747892
[clang][lex] Store `HeaderFileInfo` in a `MapVector` (#201936)
This is a re-commit of PR #200968 (f357a47) that was reverted by PR
#201702 (adaa9e0). One call-site of
`HeaderSearch::forEachExistingLocalFileInfo()` in `ASTWriter` relies on
stable order, which the `DenseMap` didn't provide. This PR switches to
`MapVector`, which has the same performance characteristics as the
original solution at the cost of a theoretical memory usage increase.
Original PR description:
Calling `FileManager::GetUniqueIDMapping()` during modular builds gets
very expensive if the `FileManager` has seen lots of files. This
function is used in two places in the `ASTWriter` to look up
`HeaderFileInfo` in `HeaderSearch`.
This PR changes the storage of `HeaderFileInfo` from
`FileEntry::getUID()`-indexed `std::vector<T>` to
`llvm::DenseMap<FileEntryRef, T>`, improving scanning performance by
~2.5%.
Reland "Remove the optional bitcast between a musttail call and its ret" (#201280) (#201642)
This relands #201280, which was reverted in #201479 because it broke the
sanitizer buildbot
The revert was caused by a heap-use-after-free in
`BitcodeReader::materialize`
Fix: The CallBase branch could have erased I before we read it in the
new conditional