[pull] main from llvm:main - #1724
Merged
Merged
Conversation
…itializer_list constructor (#205440) `modernize-return-braced-init-list` rewrites `return T(args)` to `return T{args}`. When `T` has a `std::initializer_list` constructor this can change behavior: per [over.match.list], list-initialization prefers initializer-list constructors, so the braced form may call a different constructor than the parenthesized call.
Closes #184513. This PR implements the matrix api for `pow` in `HLSLintrinsics.td`, adds matrix codegen tests, matrix sema tests, and matrix backend tests. Assisted-by: Github Copilot
Added checks that at the end of lockSlow, the lock is held and when doing an unlock, the lock is held. This found a bug in primary32.h:unmapTestOnly where the lock is not held, so fixed that.
… Windows support (#208196) The existing host-adaptation mechanism in BaseSPIRTargetInfo copies type properties from the host but has gaps causing incorrect behavior on Windows: 1. PointerWidth/PointerAlign, SizeType, PtrDiffType, IntPtrType were not copied from the host; derived classes hardcoded LP64 defaults. 2. getBuiltinVaListKind() returned VoidPtr unconditionally instead of delegating to the host's va_list kind. 3. Derived-class constructors unconditionally overwrote host-adapted values, working on Linux only by coincidence. This patch addresses these issues by copying pointer-related types from the host in BaseSPIRTargetInfo, delegating va_list kind to the host, and setting architecture-appropriate defaults in derived classes when no host is present or when host and device pointer widths differ. TO-DO (follow-up PR): Diagnose invalid host-target pairings.
…server (#214448) `test_memory_reads_when_examining_frame0_locals` asserts that examining frame 0's locals reads no stack memory, which only holds when debugserver expedites the stopped frame's stack in `jThreadsInfo`. That is added in b631e0c, so the assertion only holds for an in-tree debugserver. The GreenDragon `lldb-cmake-sanitized` bot configures with `-DLLDB_USE_SYSTEM_DEBUGSERVER=ON`, so it tests against the debugserver shipped in Xcode. That one predates the expedite, so test fails: ``` FAIL: test_memory_reads_when_examining_frame0_locals AssertionError: 2 != 0 : expected NO stack memory reads for frame 0 (its stack is expedited in jThreadsInfo). memory reads while examining locals: stack=2 heap=1 other=1 (total=4) stack region: [0x16b540000,0x16f53c000) stack reads: [0x16f53ac00,0x16f53ae00), [0x16f53aa00,0x16f53ac00) ``` It adds `@skipIfOutOfTreeDebugserver` to `test_memory_reads_when_examining_frame0_locals`. The other three tests in the file pass there because they only rely on the frame pointer backchain expedite, which is old enough to be in the shipped debugserver.
…t loop (#203256) A scalar value latched per-lane inside a divergent loop was being folded into a use after the loop, so every lane wrongly read the same value
libhipcxx provides C++ library support for HIP device code, similar to libcudacxx for CUDA. CUDA toolchains make libcudacxx available through the toolkit include path by default. HIP users should likewise be able to include libhipcxx headers without an installation-specific include option. Add include/libhipcxx from the selected ROCm installation when the directory exists. It follows the same search order and controls as the other HIP include paths.
The problem is related to `S_AND (S_AND x, x), exec` case When the nested mask op is the outer S_AND/S_OR first operand with two identical operands, combineMasks kept exec instead of a nested operand, folding to S_AND exec, exec and dropping the condition
Rewrite the fsub->fma_mix pattern as `fma((-y), 1.0, x)` using the free neg_lo modifier instead of multiplying by -1.0 (which doesn't always flip the sign of NaN), use the hardware free neg_lo bit, which does a true sign flip. As a result, now the fold always matches fsub actual behavior instead of only in the common case (non-NaN FP numbers)
- post-RA: rename test cases, reorder them, add artificially interfering instruction in between pairs, add negative runlines - add pre-RA test - add missing label boundaries checks
And add missing label boundaries checks.
* Add more `O_` flags (in particular, `O_LARGEFILE`) to fcntl-macros and group all creation/status flags (shared and arch-specific) together. * Add Linux `CLONE_` flags to sched-macros (to be exposed from `<sched.h>`). Those are also provided in `<linux/sched.h>` kernel header, but the libc users often expect to find them in regular `<sched.h>` as those are passed to `clone()` syscall wrapper. Migrate internal Linux thread implementation to use our own header (instead of Linux kernel) for these macro.
Reduce a couple of tests in depend_diff_types in a way that preserves SCEV expressions, by creating invariants that we hoist outside the loop. This makes the tests a bit clearer. Illustration: https://godbolt.org/z/eTqdoPPzn Co-authored-by: Andrei Elovikov <andrei.elovikov@sifive.com>
Visual Studio 2026 has trouble generating valid solutions for projects with mismatching directory names. The change renames the Compiler-RT target to match the directory name "compiler-rt" in all CMake files.
…214304) This includes several separate changes for the workflow, which were necessary to get the testing to pass: * Merged release-man-pages-validate-input into the release-documentation job. * Split the release note uploading into a separate job. * Moved the environment declaration to the upload-man-pages job. * Stopped forcing clang as the compiler in build-docs.sh script. This was causing the runtimes build to fail, because the default Ubuntu debian packages for clang where not providing all the necessary CMake files. It seems that when you use clang as the compiler, the runtimes try to use the cmake files installed along with it.
Fixes #213814. Comparing two half vectors in default mode crashed Clang with a `convertHalfVecBinOp` assertion because the function expects the result to be a half/short vector while HLSL returns an int vector. This PR fixes the bug by skipping the conversion function when the result type is not a half or short vector. This lets it fall through to the default `BinaryOperator::Create` path, which builds the comparison correctly with the int vector result type. The PR also adds regression tests covering the six comparison operators. Assisted-by: Claude Opus 4.8
…208263) This commit is a change to `wasm-ld`'s behavior when the `--cooperative-threading` flag is passed to the linker. The change here is to by default work as if `--export-table` was passed as well. This is required conventionally on this target because the table is where function pointers are read from in the component model `thread.new-indirect` intrinsic. If the table is not exported then there's no way to turn the core module into a component so it's effectively required. This behavior only applies to when the table isn't otherwise imported, for example in shared libraries. The other motivation behind this change is that it'll avoid the need to manually specify `-Wl,--export-table` when compiling for the `wasm32-wasip3` target. This additionally avoids the need for the Clang driver to figure out if flags like `--import-table` were otherwise passed. Basically it seemed best to put this in `wasm-ld` itself to avoid as little juggling of pieces as necessary. cc WebAssembly/wasi-libc#808
This is the follow up for commit 0fc5d0a, which added IR support for cache hint metadata, as described in https://discourse.llvm.org/t/rfc-composable-and-extensible-memory-cache-control-hints-in-llvm-ir/89443. See previous #175901 that I closed in favor of this one. This PR adds support in SelectionDAG and lowering in NVPTX. Supported cache hints: L1 eviction: L1::evict_first, L1::evict_last, L1::evict_unchanged, L1::no_allocate (requires SM 70+) L2 eviction: L2::evict_first, L2::evict_last (requires SM 70+) L2 prefetch: L2::64B, L2::128B (SM 75+), L2::256B (SM 80+) L2::cache_hint with 64-bit cache policy descriptor (SM 80+, PTX 7.4+) L1 eviction: L1::evict_first, L1::evict_last, L1::evict_unchanged, L1::no_allocate (requires SM 70+ and PTX 7.4+) L2 eviction: L2::evict_first, L2::evict_last (requires SM 100+, PTX 8.8+, and a 256-bit .v8.b32 or .v4.b64 memory operation) L2 prefetch: L2::64B, L2::128B (requires SM 75+ and PTX 7.4+), L2::256B (requires SM 80+ and PTX 7.4+) L2 cache policy: L2::cache_hint with a 64-bit cache policy descriptor (requires SM 80+ and PTX 7.4+) I know this is a fairly large PR, but I needed to plug the support all the way through the backend. I supposed I could add machinery in SelectionDAG as an initial PR, but I'm not sure if that makes sense. I implemented lowering on load + store + memcpy. I supposed memcpy can go in a follow-up, but it doesn't really reduce the size that much. TODO: - implement support in global ISEL - Implement lowering in NVPTX for atomics + other intrinsics (llvm.masked.load/store) - Better handling of cache hint metadata in legalization. Today we will often drop the metadata. If we legalize a wide vector load into a bunch of smaller loads, for example, we should preserve the metadata. - Preserve L2 eviction metadata for suitably aligned, 32-byte-multiple memcpy operations Design decisions: - I encoded the metadata in the MachineMemOperand. I hope it's ok to increase the size. I think this is the best place because similar information (atomic info, range metadata, etc...) is all stored there. - When the metadata node values (strings which are target dependent) are not valid for NVPTX, I call `ctx.emitError` to emit a diagnostic. I think this is best because we wouldn't want front-ends to accidentally emit incorrect metadata and for it to silently be dropped. Co-authored-by: Fiigii <feipeng.compiler@gmail.com> Assisted by AI
…4546) Fixes an issue where aggregate types containing fp128 non-zero elements would cause "unsupported type" due to missing case in bufferLEByte. Adds fp128-global.ll test.
Move the ExecutionSession reference and callee address up from the SPS implementation into the rt::Caller base, together with their constructor and new executionSession() / calleeAddr() accessors. The named callers (MainCaller, VoidVoidCaller, ...) become plain aliases of Caller rather than subclasses, and rt::sps::Caller inherits the base constructor. Add an explicit operator bool() reporting whether the caller has a non-null callee address. Give rt::sps::Caller::Create a SymbolLookupFlags parameter. Looking the callee up as a weakly-referenced symbol now yields a caller with a null callee (operator bool == false) when the symbol is absent, rather than an error -- so callers for optional runtime functions can be constructed and then tested for availability. Adds SPSCallersTest coverage for operator bool and the accessors, and for the required/weak x present/absent Create paths.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )