[pull] main from llvm:main - #1720
Merged
Merged
Conversation
…-artifact (#213830) The workflow is now self-contained and checks out its own scripts, so we don't need to do this in the calling workflow. The '$' prefix in the uses tag tells github actions to load the action from the repository directly rather than searching for it on the local file system. https://github.blog/changelog/2026-07-30-reference-same-repository-actions-with-self-repository-syntax/
…uilder (#214028) This provides better-than-nothing coverage at a low cost.
This avoids the breakage introduced by #213748.
Refactor atomic builtin checks into their switch case and defer constant evaluation of dependent arguments until instantiation, avoiding a potential crash during template definition. Fixes ROCM-29058.
Enable the existing gfx1250 and gfx13 GlobalISel coverage now that tanh operands are assigned to VGPRs.
…es (#211053) ## Summary `convert-xegpu-to-xevm` asserts/crashes when a memref's memory space isn't an `IntegerAttr` — e.g. `memref<1024xf32, #spirv.storage_class<StorageBuffer>>`. `LoadStoreToXeVMPattern` and `PrefetchToXeVMPattern` compute the LLVM pointer address space via the deprecated `MemRefType::getMemorySpaceAsInt()`, which asserts on anything but an integer. Memref memory spaces aren't integer-only in general (GPU address spaces and XeVM's own `xevm::AddrSpaceAttr` are both legal here) — the file's own `isSharedMemRef` already handles this correctly elsewhere, these three call sites just didn't. ## Fix Add `getNumericMemorySpace()`: maps `IntegerAttr` (unchanged, verbatim), `xevm::AddrSpaceAttr`, and `gpu::AddressSpaceAttr` onto XeVM's numeric address spaces, and returns `failure()` for anything else so callers reject the op via `notifyMatchFailure` instead of asserting. `isSharedMemRef` now just calls this helper instead of duplicating the attribute dispatch. SPIR-V storage classes are deliberately not translated: SPIR-V is a lowering target for XeGPU, not a memory space meant to be used alongside the XeGPU dialect, so `#spirv.storage_class<...>` falls through to `failure()` and produces a clean legalization error. Not using `TypeConverter::addTypeAttributeConversion` since this pass overrides `MemRefType` conversion to a bare integer r than an LLVM struct descriptor, so that hook is never consulted. ## Test plan - The reported repro no longer crashes — it now fails legalization cleanly - `failed_conversion.mlir`: added a `#spirv.storage_class<StorageBuff case, verifying a legalization failure instead of an assert - Full XeGPUToXeVM test suite passes Fixes #210988
When the pass rewrites a callee's signature, any `cir.get_global` holding that function's address is left behind at the old type. The verifier ties a get_global's pointee to the symbol it names, so the module stops verifying. Returning the address of a function that returns a 32-byte struct is enough to hit it. Each address now gets retyped to whatever signature its callee ended up with, then cast back so the existing uses still see the type they were built for. That happens in the same iteration that rewrites the callee, so the module is only ever inconsistent for one function at a time. Assisted-by: Cursor / claude-opus-5
Missing lit.local.cfg for NVPTX AtomicExpand test.
…214100) `FunctionInfo::create` took the declared-parameter count as a bare `std::optional<unsigned>`, where an absent value meant the signature has no ellipsis, because `isVariadic()` was `NumRequired.has_value()`. A caller who reads that parameter name and passes the real count for a non-variadic signature makes `isVariadic()` true even though there is no ellipsis. A reviewer read the parameter that way on [#213315](#213315) and asked for this move as a follow-up. `RequiredArgs` moves out of `CallConvLoweringPass` and into the library, so both producers name the case they mean instead of encoding it. This is the same shape as clang's `RequiredArgs` in `CGFunctionInfo.h`, minus the members that would have no caller here. The x86_64 classifier in `llvm/lib/ABI/Targets/X86.cpp` is untouched, since `getNumRequiredArgs()` keeps its signature. Assisted-by: Cursor / claude-opus-5
This change adds `clang-ssaf-linker multi-arch create` for bundling per-architecture artifacts into a unified multi-architecture bundle. rdar://184145734
I found this trying to set up our Windows buildbot. Manually reproduced the issue and verified the fix. Signed-off-by: Nick Sarnie <nick.sarnie@intel.com>
TestRunLocker is intended to confirm that certain SB API commands behave correctly while the inferior process is running. It has two modes - one where it launches the process stopped, and then resumes it, and another where it simply launches it. Both are intended to wait until the process is eStateRunning, and then do the test commands including a HandleCommand that refers to `lldb.target`. This test is flakey on Linux and macOS because `lldb.target` comes back as a None type very early in process setup. We weren't actually running the "launch to the first instruction, then resume the process" codepath that this test was written to have - I fixed that last week. But we still see flakey behavior. I thought the flakiness might be the private stops we are doing as we're notified about binaries being loaded in the process, stepping past the breakpoint in the dynamic loader, and then resume. I tested this theory by changing the inferior program to be a tight infinite loop, then putting a breakpoint with a very high skip count, so lldb was forced to do many private stop/resumes. I changed the test case to launch to main(), then start hitting these infinite private stop/resumes and doing the test commands. The test commands work fine in this case. It's something unique about the early process startup that is triggering the flakey failures. On the one hand, there is something wrong here, where `lldb.target` will return None when we are doing commands while executing very early in startup. But that wasn't what this test was intended to exercise, and most importantly, it doesn't work consistently so hammering on this in a test case is just making our CI less reliable. I removed the "launch to first instruction, then resume" codepath and have TestRunLocker run to a breakpoint on main() - where we've done all our process setup and binary loading - then resume the process and test our commands while the inferior is in eStateRunning. It doens't fail any more on my macOS desktop. I also removed a Skip for aarch64 linux which said it was flakey. I expect that's the same flakiness that's hitting all the other CI too.
Right now everything fails because it can't find `LLVMOffload.dll`. We handle this for e2e tests [here](https://github.com/llvm/llvm-project/blob/main/offload/test/lit.cfg#L212), but not for the unit tests. Signed-off-by: Nick Sarnie <nick.sarnie@intel.com>
The library definitions go out of the way to avoid adding sqrtf, in favor of __hexagon_sqrtf. I'm assuming that libm does provide sqrtf, it just happens that there is a more-preferred function to use. RuntimeLibcallsInfo should express the full set of functions that do exist, and LibcallLoweringInfo should express the preference for which calls should be used. By the current ordering rules, it just so happens __hexagon_sqrtf will win out for SQRT_F32. Add this to avoid a special case to faciliate future libcall improvements. Co-authored-by: Claude (Claude-Opus-4.8) <noreply@anthropic.com>
…211352) Commit f6a359f (#194639) removed an intrinsic ID check against Intrinsic::not_intrinsic. This check is needed because a call instruction can be cast to an intrinsic instruction if the called function's name starts with "llvm." (see llvm::Function::isIntrinsic). This means if ReplaceWithVeclib is given an invalid intrinsic, it will fail with an assertion failure.
…ructions. (#213869) G_OR can be selected via tablegen patterns, and other fp elements of selectBinOp were no longer used. unsupportedBinOp was just testing things that should always be true.
…mbol ABIs (#211618) MSP430's __mspabi_cmpd/__mspabi_cmpf are one three-way compare symbol serving every predicate, previously modeled as six suffixed impls each. Replace them with a single generic operator FCMP3_*, and give softenSetCCOperands a 3rd lowering option. After the boolean O*_F* and the per-predicate FCMP3_<pred>_F* helpers, use the generic FCMP3_F* helper tested with the predicate's condition code. Also opt __nedf2 out of the MSP430 default set: it was the only libgcc F64 compare not already opted out, so it would otherwise provide FCMP3_UNE_F64 and win over __mspabi_cmpd for not-equal. Co-authored-by: Claude (Opus 4.8) <noreply@anthropic.com>
This moves the code out of PreprocessISelDAG into Select where it should be performed.
## Summary `ProcessElfCore` already parses `NT_FILE`, but its cached `PT_LOAD` memory-region entries did not retain their backing filenames. - cache a complete `MemoryRegionInfo` for each `PT_LOAD` instead of rebuilding one from a custom permissions/name record on every query - associate an `NT_FILE` pathname when the `PT_LOAD` and `NT_FILE` starts match; their ends may differ, while a `PT_LOAD` beginning inside an `NT_FILE` range remains unnamed - finalize names and memory-tag state after all program headers are parsed, making the result independent of `PT_LOAD` and `PT_NOTE` ordering - preserve regions with `p_filesz == 0` and return the cached region directly from `DoGetMemoryRegionInfo` - add API coverage for the same-start/different-end case, an interior unnamed region, and an unnamed NT_FILE-only tail ## Testing - Clean LLVM 24/LLDB build completed successfully. - `check-lldb-api-functionalities-postmortem-elf-core` (4/4 passed) - `ProcessElfCoreTests` (3/3 passed) - `check-lldb-api-linux-aarch64-mte_core_file` (1/1 passed) - Real IPNext core compatibility smoke test using an assertion-disabled Release build: ``` (lldb) memory region 0x7fc4f25fd000 [0x00007fc4f25fd000-0x00007fc4f2600000) r-- /tmp/aot_inductor_loaded_modelaCZzUI/ckq4hskzrtwkbxruge7ofytm2zmahqgcizkszojgcp3eepdubxc2.hsaco ``` The focused API fixture exercises the mismatched-end and interior-start policies; the production core verifies compatibility with a large zero-file-size HSACO mapping. Co-authored-by: Chen Li <chenlii@fb.com>
Passing a union to a function does not work. The x86_64 bridge rejects every one, so the pass fails on any signature naming a union. Additionally, indirect arguments have their byval and sret alignment wrong, because `mapCIRType` asks DataLayout for it, and DataLayout only sees a record's members, never `__attribute__((aligned(N)))`. Unions now go through the ABI library's union type, which puts every member at offset zero and sizes each eightbyte from the union rather than from a single member. The alignment comes from the record-layout metadata the AST already fills in, which fixes over-aligned structs too, since they share that lookup. Assisted-by: Cursor / claude-opus-5
…211411) Currently clang, flang, and libc all copy documentation from the source tree into the build tree in preparation to build it, usually to create a combined tree that includes generated documentation files, like AttributeReference.md. However, renaming a document and rebuilding without cleaning the docs tree leaves behind stale documentation files that can accumulate. This patch fixes the problem with two build actions: 1. List source documentation files. Always out of date, always regenerates on every doc build, but it's very cheap. 2. Copy all source documents to the output, and delete any file that neither originates from the source directory nor is mentioned as a generated source to preserve. These actions are implemented as CMake script files (`cmake -P`) since they do things not covered by the builtin tools (`cmake -E copy_if_different`). They could be simplified if we were willing to tolerate more process launch overhead, but for something that runs on the critical path to every doc rebuild, I decided it was worth spending lines of CMake script on it. Assisted-by: a coding tool
…#204077) WMMA instructions in gfx1250 exposes an execution window during which only certain other instruction classes may co-execute. Teach the hazard recognizer about those windows so the scheduler can fill co-execution slots and account for the resulting stalls. This adds a preRA hazard recognizer mode. Add AMDGPUCoExecInfo.h, a shared model of a co-execution window: the per-stage capability bitmask, the stage types (CoExecStageType), and CoExecInfo, which maps a multi-cycle instruction to its per-cycle slot pattern via getCoExecInfo(). InstructionFlavor and its helpers move here from AMDGPUCoExecSchedStrategy.h with no functional change so they can be shared by the scheduler and the hazard recognizer.
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 : )