DAG: Gracefully diagnose missing floating-point state libcalls
Previously makeStateFunctionCall would hit a fatal error if the target has
no fegetenv/fesetenv/fegetmode/fesetmode implementation. Report a proper
context error and emit nothing.
Co-authored-by: Claude Opus 5 <noreply at anthropic.com>
[Flang-RT] Skip SIGFPE tests under WSL1 (#227876)
The floating-point exceptions do not work under WSL1 because the SIGFPE
trap does not propagate to the application
(https://github.com/microsoft/WSL/issues/3657). Mark these tests as
UNSUPPORTED for wsl1.
The Subsystem For Windows detection mechanism is the same as for LLVM
(#137822).
[flang][OpenMP] Improve check for LINEAR and ORDERED with argument (#228235)
The LINEAR clause is not allowed on a construct if an ORDERED clause
with an argument is present. The new message is clearer about the
argument to the ORDERED clause.
[CIR][AMDGPU] Drop stale logb FIXME in amdgcnspirv-builtins.hip (NFC) (#228404)
#228004 made CIR emit nsw add and ordered compare for logb, so update
the SPIR-V checks to match
Fix failure appeared on main branch
DAG: Gracefully diagnose missing fp-compare libcall when softening
Avoid fatal errors, and legalize to poison with a proper context
error.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
CodeGen: Fix stale live range for undef PHI sources on split edges (#228057)
SplitCriticalEdge collects the PHI sources coming from the new block so
the trimming loop below does not undo the segment just added for them.
An undef operand gets no segment, but was still added to the set, so a
register that is only an undef PHI operand on the split edge kept the
stale extension of its live range through the new block.
Co-authored-by: Claude Opus 5 <noreply at anthropic.com>
NAS-144136 / 28.0.0-BETA.1 / Report crash-looping app containers as crashed (#19896)
## Problem
A container that exits with an error under the catalog's default
`unless-stopped` restart policy is reported by Docker as `restarting`,
not `exited`. The container state mapping only looked at the exit code
for `exited`, so a crash-looping container fell through to `exited`. A
multi-container app with a healthy sibling then showed as Running, and a
single-container app showed as Stopped, which hid its workloads and
blocked logs, upgrade and rollback.
## Solution
Treat a `restarting` container as crashed when its last exit code is
non-zero. Docker only restarts a container after an exit it didn't
cause, since stopping or killing it through Docker cancels the restart
policy, so any non-zero code there is a real failure, including 137 from
an OOM kill. A restart after a clean exit is still reported as exited.
Added a unit test for the Docker status to container state mapping,
which had no coverage.
[clang-repl] Fix PTX emission for CUDA inputs with no device code (#226977)
Previously, GeneratePTX() returned an error when PassManager::run()
returned false. That value reports whether any pass changed the module,
not whether emission succeeded. IIUC, addPassesToEmitFile() should be
the only failure point, which is already checked.
The check was harmless until e8b75c172810 ("[NVPTX] Add NewPM
boilerplate to NVPTXAssignValidGlobalNames"). Before it, that pass
returned true unconditionally (if the pass succeeded), so run() always
reported a change. Now a device module without a function definition,
produced in the case of host-only inputs, reports no change and fails
the check, falsely erroring out with `Failed to emit PTX code.` Due to
this, every host-only input to `clang-repl --cuda` is now rejected on
main. The host-supports-cuda lit probe consists mostly of such inputs,
so clang/test/Interpreter/CUDA reports UNSUPPORTED instead of failing.
I've also added a test with host-only inputs so a regression like this
could be caught.
[offload][omp] Move OpenMP KLE to libomptarget
Move preparations related to OpenMP KLE and
dynamicCGroupMem fallback out of the plugins and
into libomptarget.
Resructure Device::launch as it grew too large.
mount(8): Detect known filesystem types in raw GPT partitions
mount(8) previously only guessed the filesystem from the disklabel
fstype. DIOCGPART already puts the GPT partition type UUID in
partinfo.fstype_uuid, but mount(8) never looked at it. A raw GPT
partition has fstype 0, so mount(8) would warn and fall back to ufs.
Update checkdisklabel() to look the fstype_uuid up in a table of known
GPT partition types (EFI -> msdos, the DragonFly/FreeBSD native types ->
ufs/hammer/hammer2) if the disklabel fstype does not map. Unknown GPT
partition types keep the old warning and ufs fallback.
Bug: #3401
efi/loader: Improve the linker script and LDFLAGS
* Remove the stale comment of `.hash`, which is empty under the default
`--hash-style=gnu`. The image base is also pinned by
`. = 0; ImageBase = .`.
* Fold the remaining linker-generated PLT sections (`.plt.*` and `.iplt`)
into `.text` so the `objcopy -j .text` can never drop them.
* Add `-Wl,-z,defs` to fail the link if there are unresolved symbols,
instead of generating PLT entries for them.
* Add `-Wl,--no-eh-frame-hdr` to skip generating the `.eh_frame_hdr`
section because it's never copied into the final `loader.efi`
executable. What's worse, the generation sidesteps a bug in
bintuils/bfd that produced the misleading overlapping FDEs error, as
observed in the previous commit.
Assisted-by: DeepSeek-v4.1-flash (with Pi Coding Agent)
[BOLT] Support SHF_COMPRESSED DWARF debug sections. (#215835)
**Before:** BOLT will report an error when `--update-debug-sections` is
enabled and the input contains a `SHF_COMPRESSED` debug section, stating
that "`--update-debug-sections` requires uncompressed debug
information". This was implemented in #185662.
**After:** This patch follows up on this PR and adds support for
`SHF_COMPRESSED` debug information. BOLT now can decompress `zlib` /
`zstd` compressed debug information, update them and then recompress
with their original compression. This patch also validates compressed
debug sections, reporting an error if applicable. As mentioned in
#185662, legacy GNU-style compression is not handled.
Assisted-by: Codex
[Offload][L0][NFC] Remove unused zexKernelGetArgumentSize dispatcher (#227589)
The KernelGetArgumentSize dispatcher is loaded during context init but
never called.
#218367 converted it to a ZeDispatcher but also removed its only
callers.
Argument sizes are now either not needed
(zeCommandListAppendLaunchKernelWithArguments) or come from
LaunchArgs.ArgSizes on the fallback path, so the driver query is no
longer used(other than debug printing).
This removes the now dead optional API declaration, the dispatcher
member, its loadExperimental call and the related debug output.
Not tested on actual GPU hardware however the plugin builds without
error(which I think should be sufficient check).
AI was only used in a review on unrelated changes which noted this dead
code.
DAG: Gracefully diagnose missing FMA and ppcf128 expansion libcalls (#228094)
Previously this would hit a fatal error. Legalize to poison and report a proper
context error.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
[RISCV] Consider truncate semantics in performINSERT_VECTOR_ELTCombine (#228243)
This fixes a miscompile in performINSERT_VECTOR_ELTCombine dating back
to when it was added (#72675), but only just showing up through testing
when a recent unrelated change triggered vectorisation for a function
that trips it within Clang, leading to broken builds on some of the
two-stage RVV buildbots.
After type legalization the scalar binop can be wider than the vector
element type, with the insert implicitly truncating it. That isn't
equivalent for shifts and a similar bug was found and fixed in a
neighbouring combine in #81168. This patch just applies the same fix
(with the same comment even), avoiding the transform if the scalar type
doesn't match the element type.
I used an LLM to root cause the issue and produce the test case.
[Offload][L0][NFC] Remove staging buffers dead-code (#227979)
Async queues were the only user of Staging Buffers and as they were
removed this is now dead code we can remove.
Assisted by Claude.