Skip to content

merge main into amd-staging - #4590

Merged
ronlieb merged 12 commits into
amd-stagingfrom
amd/merge/upstream_merge_20260923102447
Sep 23, 2026
Merged

ronlieb merged 12 commits into
amd-stagingfrom
amd/merge/upstream_merge_20260923102447

Conversation

@ronlieb

@ronlieb ronlieb commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

arsenm and others added 12 commits September 23, 2026 12:05
…lvm#224249)

Eventually createDataLayout should be removed, so migrate these uses.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply@anthropic.com>
Dylib windows implementation. 

 LoadLibraryA and FreeLibrary for library lifetime management.
 GetProcAddress for symbol lookup in individual libraries.

We use a sentinel value to emulate global lookup (address of a local
linkage variable).
Uses the same reverse ordering as orc-v1.
llvm#225634)

Argument lowering matched only AMDGPU_KERNEL, so spir_kernel fell into
the normal calling convention path and failed, unlike SelectionDAG
…25656)

If an instruction doesn't define or use a vector register it won't
take part in the dataflow analysis. Skipping these improves compile
time. Measured to reduce geomean −0.379% instructions retired on
CTMark w/ a stage2 rva23u64 -O3 Clang build.
Control-flow hoisting handling in LICM was originally introduced for
hoisting PNs as part of a delayed phi-to-select conversion effort, whose
enabling however was soon reverted due to compile-time regressions and
the direction never pursued further. As such, unmaintained code has been
removed.
Session::reportError is called in contexts where throwing would be
unsafe (e.g. while holding another Error value to return via the stack),
so it must not throw.
…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>
@ronlieb
ronlieb requested review from a team and dpalermo September 23, 2026 15:26
@rocm-cciapp

rocm-cciapp Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Note

CCI merge-inner bisection finished

Started 2026-09-23 17:18 UTC. This comment is updated about once an hour.

Status

Elapsed 45m 15s
Inner commits 11
Probes so far 11
Verify compiler-runtime + AOMP hpc2021/532.sph_exa_t · gfx90a
Failed check gfx90a Test → aompSmoke (commit-status)
Result bisection summary
Good merge / first parent 5f6a5f2a4673
Bad merge 7adc8951ab3e

Probe timeline so far (newest → oldest)

Inner SHA Result
11/11 34152bb7d2f3 SKIP skip-compiler-runtime
10/11 5bb2e21c30de SKIP skip-compiler-runtime
9/11 a3a45508d77c SKIP skip-compiler-runtime
8/11 37e2844bc468 SKIP skip-compiler-runtime
7/11 7a3edbfbcf4a SKIP skip-compiler-runtime
6/11 a4a3c487251e SKIP skip-compiler-runtime
5/11 80a1eaf320f2 SKIP skip-compiler-runtime
4/11 8022a985db5a SKIP skip-compiler-runtime
3/11 d56ee7ad2a41 SKIP skip-compiler-runtime
2/11 ae88993db5db SKIP skip-compiler-runtime
1/11 8026eba98cb3 SKIP skip-compiler-runtime

@ronlieb

ronlieb commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator Author

!PSDB

@rocm-cciapp

rocm-cciapp Bot commented Sep 23, 2026

Copy link
Copy Markdown

Warning

No culprit found. Bisection did not find a passing inner commit, so it could not isolate a first-bad SHA.
Every probed commit failed or was skipped. Check graft/skip noise, the verify stage, and the original CI log.

CCI merge-inner bisection

Good merge / first parent 5f6a5f2a4673
Bad merge 7adc8951ab3e
Verify compiler-runtime + AOMP hpc2021/532.sph_exa_t · gfx90a
Failed check gfx90a Test → aompSmoke (commit-status)
Inner commits 11
Probes 11

Probe timeline (newest → oldest)

Inner SHA Result
11/11 34152bb7d2f3 SKIP skip-compiler-runtime
10/11 5bb2e21c30de SKIP skip-compiler-runtime
9/11 a3a45508d77c SKIP skip-compiler-runtime
8/11 37e2844bc468 SKIP skip-compiler-runtime
7/11 7a3edbfbcf4a SKIP skip-compiler-runtime
6/11 a4a3c487251e SKIP skip-compiler-runtime
5/11 80a1eaf320f2 SKIP skip-compiler-runtime
4/11 8022a985db5a SKIP skip-compiler-runtime
3/11 d56ee7ad2a41 SKIP skip-compiler-runtime
2/11 ae88993db5db SKIP skip-compiler-runtime
1/11 8026eba98cb3 SKIP skip-compiler-runtime
Bisect metadata

@ronlieb
ronlieb merged commit 7feac1b into amd-staging Sep 23, 2026
83 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.