Conversation
…225501) The benchmark uses std::strlen but never includes <cstring>.
Previously, we would build GoogleBenchmark against the just-built library, not against the library being tested. When testing historical versions of libc++ or other standard libraries, this breaks. So instead of building Google Benchmark against the just-built library in CMake, do it from Lit as part of the test suite's configuration. I'm not a huge fan of using Lit as a poor man's build system and we should make the CMake test suite self-contained, however this is a step in the right direction and it removes a major coupling between the test suite and the regular libc++ build.
Add option [no]mark-plt to enable it. Dynamic linker can change PLT entries with JMPABS instruction on supported targets. Ref.: https://maskray.me/blog/2021-09-19-all-about-procedure-linkage-table#x86-plt-rewriting Assisted-by: Claude Sonnet 4.6 --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
…#211757) Currently the atomic optimizer creates reductions via intrinsics, and introduces new control flows. Replace this sub-target dependent logic with the existing wave reduction intrinsics, which get lowered in the backend. This patch ports the uniform-value and divergent-no-return-value cases. To port the divergent-with-return-value cases, additional scan intrinsics will need to be added.
…vm#217859) This patch extends intrinsic `DefaultValue` auto-upgrade to overloaded intrinsics. --------- Signed-off-by: DharuniRAcharya <dharunira@nvidia.com>
Adds Windows page size detection for ORC-RT using GetSystemInfo. Also updates the process-info regression coverage into a single test
…225567) This ensures the undef/poison value is always nan-boxed. This is important if the value ends up being used by a freeze. If the value isn't properly nan-boxed, it will be treated as a nan in FP contexts regardless of its lower bits. If the freeze is also cast to an integer, the lack of nan-boxing will be noticed and the integer will see the real value of the lower bits. Fixes llvm#225455.
…25274) This is a new checker that requires a Borrow<T> when using a pointer/reference/view that is lifetimebound to a CanBorrow type. A CanBorrow type is a type that tracks views into its interior at runtime, and calls crashIfBorrowed() when it invalidates such views. Vector is the motivating example. A design description is available at: https://github.com/WebKit/WebKit/wiki/SaferCPP:-Borrowed-Pointer-Use-After-Destruction I implemented UnborrowedLocalVarsChecker in terms of the existing alpha.webkit.*LocalVarsChecker system because the requirement to hold an overlooking smart-pointer-like-thing is pretty similar. In some cases where the new checker is stricter than the existing checker, this patch conditionalizes the strictness. The plan is to upgrade existing checkers in a follow-up patch. Assisted-by: Claude
Ports llvm/Testing/Support/Error.h to orc_rt: EXPECT_THAT_ERROR and ASSERT_THAT_ERROR, EXPECT_THAT_EXPECTED and ASSERT_THAT_EXPECTED, and the Succeeded, Failed, Failed<InfoT>, FailedWithMessage and HasValue matchers. Two departures from the original. An orc_rt Error carries at most one ErrorInfoBase -- there is no joinErrors -- so the holder keeps a single error, FailedWithMessage takes one matcher rather than a variadic pack, and FailedWithMessageArray is dropped. ErrorInfoBase has dynamicRTTIName, so a type mismatch names the type that did turn up rather than reporting only that the expected one was absent. Header-only, under test/unit with the other test helpers rather than in a shipped testing library. ErrorMatchersTest exercises each matcher against a matching and a non-matching value, the latter through gtest's failure interception.
Match ld-prime by listing synthesized Objective-C message-send stubs in Mach-O map files, including their final addresses and mode-specific sizes.
This PR contains the fix for the `readability-identifier-naming` crash. The crash happens because the checker calls `hasMemberName` on a base class without checking if that base class actually has a definition first (like when it's just forward-declared). I added a `RD->hasDefinition()` guard to fix it. Fixes llvm#213948
This allows reusing the same build script for the PR benchmark and the historical benchmarking jobs. This also opens the door to adding new configurations where the library isn't rebuilt (e.g. where the artifacts are pulled from a pre-built location, or even testing against non-libc++. Assisted by Claude
init_tls, cleanup_tls, and set_thread_ptr are per-thread routines used
by both Thread::run in libc.a and main-thread startup in crt1.o, but
tls.cpp was previously only merged into crt1.o. Linking libc.a without
crt1.o (such as a self-contained shared library statically linking
libc.a, or an executable built with -nostartfiles) failed with undefined
hidden symbols when thread.cpp.o was pulled in.
Move {x86_64,aarch64,riscv}/tls.cpp from libc/startup/linux/ to
libc/src/__support/threads/linux/ alongside tcb.h (matching prior
migrations of auxv and program_invocation_name from startup into src so
dependencies flow from startup -> src). Expose them via a forwarding
ALIAS target libc.src.__support.threads.linux.tls depended on by both
thread and do_start, and remove tls from merge_relocatable_object(crt1).
Mark init_tls with [[gnu::flatten]] and compile tls with
${libc_opt_high_flag}. Once tls.cpp.o is in libc.a rather than first on
the link line inside crt1.o, an earlier object compiled with
-fstack-protector-strong can otherwise win COMDAT selection for
LIBC_INLINE helpers (e.g. linux_syscalls::getrandom) in -O0 builds and
read %fs:0x28 before set_thread_ptr initializes the thread pointer.
Change AppProperties app in libc/config/linux/app.h from extern
[[gnu::weak]] (which resolved to NULL without crt1.o) to
LIBC_INLINE_VAR, providing a COMDAT-deduplicated .bss definition shared
by crt1.o and libc.a, matching auxv::value.
Assisted-by: Automated tooling, human reviewed.
Adds Windows virtual-memory support for ORC-RT Also adds a small Windows error helper that converts GetLastError() results into ORC-RT Error values with the corresponding system message. Turns back on all the memory tests for windows.
Previously, this was applying the offset it would for non-null pointers, but null pointers should always cast to a null pointer result. Fixes llvm#224869
Use the Error matchers introduced in 72aeee3 to clean up error checks in ConnectionSpecTest.
…m#225384) This commit reverts 3500668/llvm#225111, reapplying 9028ff1/llvm#224257. It fixes an error in risc-v assembly (forgot to adjust for constant renaming). The original commit message was: This patch implements an internal clone syscall wrapper and uses it both to implement the public clone(2) entry point and to spawn new threads in libc's thread implementation. Previously, thread creation in thread.cpp invoked the raw SYS_clone syscall directly, requiring target-specific inline assembly or register variables and subtle tricks with __builtin_frame_address to pass arguments to start_thread in the newly spawned thread. By introducing an inline assembly clone wrapper that sets up func and arg on the child stack and jumps to the entry function upon clone returning in the child, we can simplify start_thread to a normal function taking a single void * argument and eliminate the frame pointer hacks as well as the need to compile thread.cpp with -fno-omit-frame-pointer or optimizations. The public clone(2) entrypoint delegates to this wrapper after unpacking its varargs and validating pointers (returning EINVAL like glibc). A particularly tricky aspect of this patch is the invalidation of the cached thread IDs. As with fork(), we do this in the parent, but we cannot do this safely for clone() in all situations. The problematic case is where the user does not set a custom TLS block (which means the child uses the parent's block), does not clone the address space (no copy-on-write), and does not suspend the parent (vfork semantics). In this case, we just give up and don't touch the thread ID. For this particular flag, most of the operations in the child are not safe, so we're assuming the user is prepared for such a restricted environment. Support is implemented for x86_64, aarch64, and riscv. The architecture-specific assembly is split out into detail::clone_impl inside per-architecture headers. Assisted-by: Gemini
This fixes 4057f8e (llvm#225418). Buildkite error link: https://buildkite.com/llvm-project/upstream-bazel/builds?commit=4057f8e45b7fcadf99b60763c873802f8add8770 Co-authored-by: Google Bazel Bot <google-bazel-bot@google.com>
This avoids the duplicate definitions.
Support for omp dispatch and omp dispatch nowait in flang. ----- Sunil Kuravinakop (koops@hpe.com)
…5415) This switches Clang to use the API introduced in llvm#224652. This produces getelementptr constant expressions in canonical ptradd form.
Previously this relied on the TargetABI MCOptions field and ignored the IR flag. Co-authored-by: Claude (Claude-Opus-4.8) <noreply@anthropic.com>
Concatenate the known bits of both halves, with operand 0 as the low half and operand 1 as the high half, matching TargetLowering::SimplifyDemandedBits and GlobalISel's G_MERGE_VALUES.
Add missing #include <deque> to SimpleRemoteCAOverSocket.cpp to fix compile errors on Linux.
It isn't always the same as 'value == 0'.
…lvm#218909) The bitwise OR of different enum types resulted in many C++20 deprecation warnings in the generated option tables: warning: bitwise operation between different enumeration types ‘llvm::opt::DriverVisibility’ and ‘clang::options::ClangVisibility’ is deprecated [-Wdeprecated-enum-enum-conversion] Fix by emitting casts to `unsigned`, matching the types of the corresponding fields in `OptTable::Info`.
…lvm#224533) We reuse isCFMulFromFMSUBADD from llvm#222896 to fold vfmsubadd into vfcmulc. As a result using this pattern-match in combineFaddCFmul becomes redundant as it (c += a * ~b) still becomes vfcmaddcph through the existing fadd + vfcmulc combine.
The indentation in this entire code block was off-by-one, which incremental clang-format can't handle, so reformat the whole section.
…ests (llvm#224305) `api/multithreaded` and `api/multiple-debuggers` build a C++ driver against the SB API. Both were skipped on Windows with `"clang-cl does not support throw or catch (llvm.org/pr24538)"`, which is no longer what stops them. Two things do: the drivers fail to compile because `common.h` and `multi-process-driver.cpp` include `<unistd.h>` unconditionally, and once they compile they run on a different CRT than `liblldb.dll`: the gnu-style clang driver links [`libcmt`](https://github.com/llvm/llvm-project/blob/main/clang/lib/Driver/ToolChains/MSVC.cpp) unless `-fms-runtime-lib=` is passed, so the driver gets the static CRT while `liblldb.dll` gets the DLL one. Fixes: - Include `<direct.h>` and `<io.h>` instead of `<unistd.h>` on Windows, and get the working directory with [`_getcwd`](https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/getcwd-wgetcwd?view=msvc-170). - `get_working_dir` returns a `std::string` now. - `test_stop-hook.cpp` uses `_pipe`/`_fdopen` on Windows, and closes the pipe streams instead of the descriptors they were opened over, write end first so the interpreter's I/O thread sees EOF. - Guard the `<unistd.h>` include in `multi-process-driver.cpp`. - `buildDriver` passes `-fms-runtime-lib=dll` (`dll_dbg` for a Debug build) and drops the `libcmt` the driver adds at the link step. `test_breakpoint_location_callback` stays skipped, for an unrelated reason: `BreakpointCreateByName` with `eFunctionNameTypeFull` resolves no location in a PDB build, while `eFunctionNameTypeAuto` resolves one. Tracked in llvm#224303. rdar://177435499
…lvm#224635) This patch widens selected operands of the product calculation to `size_t`/`uint64_t` to prevent multiplication overflow when a 64-bit data size or offset is being calculated. This fixes a number of issues reported by a CodeQL scan.
…vm#225078) I spotted recently that when attempting to compile a function with an early exit loop we don't emit any remarks when we fail to vectorise due to possible faulting loads. This PR fixes that and other missing remarks, plus I've also added missing tests for some cases where we fail to vectorise early exit loops. For the remarks, I've used debug information to uniquely identify the remark and associate it with a particular function. Tests were assisted by Codex (GPT 5.5)
Adds codegen for the following AMDGCN s_prefetch builtins: - __builtin_amdgcn_s_prefetch_data - __builtin_amdgcn_s_prefetch_inst These are lowered to the corresponding `llvm.amdgcn.s.prefetch` intrinsics. Assisted by: Claude Opus 5 Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Accept the six block-scaled MX types in TOSA 1.1 draft compliance checks. Preserve REVERSE on constant value splats whose block scales can differ; reversing a unit dimension remains a no-op. Cover supported types, version and extension requirements, invalid shapes and axes, and block-scaled canonicalization. Signed-off-by: Peng Sun <peng.sun@arm.com>
…25685) ORC_RT_TEST_DLL_EXPORTS was already defined in the previous block.
…c symbol list (llvm#225495) `__ubsan_install_trap_loop_detection` passed an un-initted ` sigaction` to `sigaction(SIGPROF, ...)`, with garbage in `sa_flags` and `sa_mask` (such as setting `SA_RESETHAND`, blocking `SIGILL`, and omitting `SA_SIGINFO`). This PR fixes it by zero-initialising sigaction Two other drive-by cleanups: - set `SA_SIGINFO | SA_RESTART` because ITIMER_PROF fires SIGPROF periodically. Without SA_RESTART, any blocking syscall (read, write, waitpid, etc.) interrupted by a periodic SIGPROF tick would spuriously fail with EINTR instead of transparently resuming after SigprofHandler returns. - pass `EXTRA ubsan.syms.extra` to `add_sanitizer_rt_symbols(clang_rt.ubsan_loop_detect ...)` in `CMakeLists.txt` so `libclang_rt.ubsan_loop_detect.a.syms` is not generated as an empty `{ };` dynamic list (which causes a syntax error with GNU `ld.bfd`).
There is no reason to run this for changes to other projects/runtimes.
… (NFC) (llvm#225732) ids-check was previously failing.
…with multiple users (llvm#210460) Extend getCastInstrCost to recognize cast absorption into widening instructions (uaddl, saddw, urhadd, etc.) when the cast has multiple users, not just one. Previously, the check only looked at a single user (`I->hasOneUser()`), so a zext/sext feeding more than one widening-eligible instruction was always costed as non-free, even when every user could individually absorb it. This also affected codegen: `optimizeExtendOrTruncateConversion` in `AArch64ISelLowering.cpp` decides whether to lower a double-widening zext via tbl shuffles based on whether `getCastInstrCost` reports the cast as free. With multi-user casts always costed as non-free, this took the tbl-lowering path in cases where every user could actually absorb the cast for free, generating unnecessary tbl instructions. Compiler Explorer: - Current Assembly: https://godbolt.org/z/hG7oe5h5M - Expected Assembly: https://godbolt.org/z/EE6xnaxoG This change factors the per-user check out into `getUserAbsorbedCastCost()` and applies it across all users of the cast. The cast is only treated as free if every user can absorb it; the reported cost is the max of the per-user absorbed costs, to stay conservative when a partial-widening cost (Src->Src*2) applies for some user. Tests: - free-widening-casts.ll: new cost-model cases with multiple absorbing users. These cases had a cost of 1 without this change. - zext-to-tbl.ll: new codegen coverage showing tbl is no longer generated once the cast is correctly recognized as free.
llvm#225669) …5106)" This reverts commit b0d31f4. This missed the restriction that ORDERED is not allowed when DISTRIBUTE is a constituent construct.
CMakeList.txt was updated in llvm#225495
Add the linux_syscalls::pause wrapper using SYS_ppoll, along with the unistd pause entrypoint and unit test on Linux. Assisted-by: Automated tooling, human reviewed.
…llvm#225688) To produce constexpr gep in canonical ptradd form.
Setting a watchpoint on an SBValue variable should not trigger after the life time of the variable. because a new frame can reuse the same address for a different variable. Set the name of the variable as the watch spec.
I noticed this when trying to debug some failures, the Python log are
missing responses when compared to the C++ log.
Change the test case suffix `testcase` from `test_dap` to avoid
confusion with a session log (`dap{session_number}.log`).
dpalermo
approved these changes
Sep 23, 2026
|
Note CCI merge-inner bisection finished Started 2026-09-23 13:15 UTC. This comment is updated about once an hour. Status
Probe timeline so far (newest → oldest)
Likely culprits (intelligent first pass)Searching inner window 66/81 … 70/81 first (5 commits), then the full range if that does not bracket the failure.
Top match because: mlir in PR title, test in changed paths, dialect in changed paths. |
|
Warning First bad inner commit: Do not merge this branch. CCI merge-inner bisection
Culprit detailsProbe timeline (newest → oldest)
Bisect metadata
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.