[DirectX] Split 64-bit texture loads and stores into 32-bit pairs (#246773)
DXIL has no 64-bit overload of TextureLoad or TextureStore.
Split 64-bit texture loads and stores into i32 lo/hi pairs like typed
buffers do already.
Fixes https://github.com/llvm/llvm-project/issues/235930
Assisted by: Github Copilot
[mlir][OpenMP] Keep single-element target update sections contiguous
A target update section uses a non-contiguous descriptor unless the stride
of every dimension equals the size of the dimensions before it. A dimension
that selects one element, such as a scalar subscript, only offsets the data,
so its stride never matters, but it was still checked, so sections such as
a(i) of an allocatable array or m(i, j) needed a descriptor.
Treat a dimension whose lower and upper bounds are the same value as having
one element, which never breaks contiguity. If such a dimension would
otherwise have required a descriptor, guard the contiguous size against a
null base, as the first-dimension count of the descriptor does for absent
optional arrays and unallocated descriptors.
Fixed https://github.com/llvm/llvm-project/issues/247307
Assisted with Copilot and Claude Opus 5.5
devel/jech-dht: Update 0.27 => 0.28
Changelog:
* Fix an off-by-one error when computing the time to wake up.
* Avoid starvation of one address family (IPv4 or IPv6) when
the other address family is not functional.
https://github.com/jech/dht/blob/dht-0.28/CHANGES
While here, take maintainership.
PR: 301251
membarrier(2): do not call smp_rendezvous_cpus() with an empty mask
If the caller migrates while the mask is computed and no other thread
of the process is running, the mask is empty, and smp_rendezvous_cpus()
panics.
PR: 301240
Fixes: 4a69fc16a583 ("Add membarrier(2)")
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
membarrier(2): issue the leading fence before reading other CPUs' state
There are two problems:
- The old fence ran after the mask was computed, so a store the caller
made before the syscall could still be in its store buffer when it read
another CPU's state. A thread switched in right after that read then got
neither the IPI nor the store.
- MEMBARRIER_CMD_GLOBAL had no fence before its first pass, which marks
idle CPUs done immediately.
Fixes: 4a69fc16a583 ("Add membarrier(2)")
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
acpi/fan: Always call _FSL
Fan device can adjust the fan level itself and propogate to the APCI
Table. This however is opaque to the driver as there is no interrupt
to notify us that the fan level is chaged.
This can cause problem if we want to set the same value as the cached
one, which is all in all short-circuited.
As a result, we call _FSL unconditionally. Also, the condition is also
racy if two writes reach kernel. The value doesn't reflect the last
one. Therefore, we enlarge the critical section and use sx to protect
frequently read case.
Reported by: llm-postcr
Fixes: 116216477e8a ("acpi: Add acpi_fan")
cgthree: make cgthreeloadcmap arguments unsigned
wsdisplay_cmap and fbcmap already have these fields as unsigned.
Makes KUBSAN -Werror=array-bounds happy.
[flang][acc] Guard use_device canonicalization of OPTIONAL arguments (#247332)
`ACCUseDeviceCanonicalizer` read the descriptor of an OPTIONAL argument
unconditionally, dereferencing a null descriptor when it is absent.
Guard the address read and the in-region descriptor rebuild with
`fir.is_present`, yielding a null address and `fir.absent` when the
argument is absent, so `PRESENT()` stays false in the `host_data`
region. This covers both a box and a reference to a box (an OPTIONAL
allocatable or pointer).
[AMDGPU] MC support of neg/abs source modifiers on v_mov_b16 (#247061)
v_mov_b16 moves untyped 16-bit data, but the hardware honors the
floating-point neg/abs source modifiers on it, treating the source as
f16 (the ISA docs flag it OPF_MOV_FPMODS_OK). The assembler rejected
these, e.g. "v_mov_b16_e64 v5.l, -|v1.l|".
Fixes: LCOMPILER-3362
---------
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[AMDGPU][AsmParser] Encode f16 inline fp constants for v_pk_fmac_f16 (#245433)
On GFX11+, V_PK_FMAC_F16 replicates an f16 inline constant into both
halves of the operand. An fp literal token (e.g. 0.5, -1.0) that is an
f16 inline constant is therefore encodable as an inline constant once
replicated, matching SP3. Previously such tokens were emitted as a
32-bit literal.
Fixes: LCOMPILER-3296
[lldb] Clamp ManualDWARFIndex workers to the number of units (#244072)
`ManualDWARFIndex::IndexImpl` runs each of its parallel steps with one
task per thread pool thread and allocates one `IndexSet` per thread,
whatever the number of units to index.
For example, a module with a single compile unit on a 384 core machine,
results in ~770 queued tasks and 384 `IndexSet`s to merge for one unit
of work. Loading many small modules, such as a core file with thousands
of AMDGPU code objects or an executable linked against many small shared
libraries, spends most of its time contending on the thread pool's lock.
---------
Co-authored-by: Bar Soloveychik <barsolo at fb.com>
[DWARFLinker][Parallel] Include the class in a pointer-to-member key (#245148)
The type pool key of a DW_TAG_ptr_to_member_type was built from the
member's type alone. "int A::*" and "int B::*" got the same key, so the
type unit kept one of them and every variable of the other type referred
to it:
```
int A::*pa = &A::x; // int A::*
int B::*pb = &B::y; // int A::*
```
Add the containing type to the key.
Pointers to member functions were not affected, because the type of the
function includes the type of "this".
Assisted-by: Claude
[VPlan] Make isUsedByLoadStoreAddress independent of visit order. (#247330)
Blends were skipped unless one of their incoming values had already been
visited, so the result depended on visit order: a blend reached via its
mask first was not walked via its incoming value later, and a blend
using the value only in its mask was walked if another incoming value had
been visited. Instead, only walk to blends using the value as incoming value.
Merge freebsd/main into GhostBSD ports
Conflict resolutions:
- graphics/blender: keep 5.0.1, restored from our side.
- devel/llvm18: take FreeBSD PORTREVISION 8, restore llvm18-libs
LIB_DEPENDS.
- devel/llvm19: keep lldb.so commented out (provided by llvm19-libs),
take FreeBSD CMAKE_BUILD_TYPE_CASE plist paths.
- lang/crystal: keep llvm-config BUILD_DEPENDS, llvm-libs does not
install llvm-config.
Also sync devel/llvm23-libs to 23.1.6 to match devel/llvm23.
[libc][regex] Increase NVPTX matcher limits test stack (#247295)
The `matcher_limits_test`
[crashes](https://lab.llvm.org/staging/#/builders/248/builds/356) with a
memory access error during `MultiByteChainReuseAndAltDerivative` on the
A10 builder with the default 3 KiB device stack. This PR bumps the
binary to a 16 KiB stack.
NB: I have not reproduced this exact failure - on a local RTX 5070
(`sm_120`), the same test fails at 2 KiB in
`MultiByteChainReuseAndAltDerivative`, but passes at the default 3 KiB
and at 16 KiB. That the failure is due to the default 3 KiB limit is a
hypothesis based on similar recent failures (#246031, #244276).
Assisted-by: Devin
[VPlan] Remove redundant VPConditionalInductionPHIRecipe members (NFC) (#247326)
VPConditionalInductionPHIRecipe derives from VPHeaderPHIRecipe, so
- its computeCost is identical to the inherited
VPHeaderPHIRecipe::computeCost,
- classof(const VPHeaderPHIRecipe *) duplicates the classof overloads
from VP_CLASSOF_IMPL, which accept a VPHeaderPHIRecipe via
derived-to-base conversion, and
- listing it in CastInfo<VPPhiAccessors, VPRecipeBase *> is subsumed by
VPHeaderPHIRecipe, which precedes it in the list.