[libc] Increase stack size in NVPTX matcher stress test (#244276)
Since #236569 landed, I've been seeing a GPU memory-access error while
running `matcher_test` (buildbot error
[here](https://lab.llvm.org/buildbot/#/builders/101/builds/47542)). The
new long-pattern cases exceed the test runner’s default 3 KiB device
stack.
This PR lets test-specific `ENV` entries override
`LIBOMPTARGET_STACK_SIZE` and gives `matcher_test` a 64 KiB stack to
prevent overflow.
Verified on a local GPU: the original 3 KiB setting reproduces the
memory-access error, while 64 KiB passes all 13 matcher tests.
Assisted-by: Devin
[X86] Drop instruction prefetch with unsupported operands in LowerPREFETCH (#225826)
Fixes #218236
The x86 `PREFETCHI` instruction set extension only supports instruction
read prefetch (`IsData = 0`, `RW = 0`) with `PREFETCHIT0` (locality 3)
or `PREFETCHIT1` (locality 2) hints in 64-bit mode.
Previously, `LowerPREFETCH` only checked `!IsData &&
!Subtarget.hasPREFETCHI()` before returning the unmodified `Op`. On
targets with `PREFETCHI` enabled (e.g., `znver5`, `graniterapids`), an
instruction prefetch with write intent (`RW = 1`), unsupported locality
(0 or 1), or in 32-bit mode was left unhandled, leading to SelectionDAG
aborts.
Assisted-by: Claude
[libc] Copy the path in posix_spawn_file_actions_addopen (#239224)
POSIX says "The string described by path shall be copied by the
posix_spawn_file_actions_addopen() function", but we only stored the
pointer. If the caller reused or freed the buffer before calling
posix_spawn, the child would open whatever happened to be there at that
point. Our tests didn't notice because they only ever passed string
literals. Now they overwrite the buffer right after the call.
I'm allocating the path together with the action, which now ends with a
flexible array member. make_unique can't do variable-sized allocations,
so SpawnFileOpenAction gets a create() function, which works like
make_unique, but also takes the size of the path.
While in there:
- switch posix_spawn_file_actions_add{close,dup2} to make_unique too
- make add_action take a unique_ptr, so that the ownership transfer is
visible in its signature. It also checks that the action is trivially
destructible, which lets posix_spawn_file_actions_destroy free the
[6 lines not shown]
[StructurizeCFG] Keep loop metadata
The pass replaces the latches of a loop with new backedges and dropped
their !llvm.loop metadata, so loop hints such as llvm.loop.align had no
effect on the restructured loops.
Record the loop IDs before the rewrite, recompute LoopInfo after it and
set them again with Loop::setLoopID. A loop that several old loops are
merged into gets none, and functions with irreducible control flow are
left as before.
[InstCombine] Check the select type in the usub.sat sign mask fold
`foldICmpUSubSatWithAndForMostSignificantBitCmp` replaces a select with an
`and` that has the type of the `usub.sat` operands. When the select has a
different type, the replacement hits the assertion "replaceAllUses of value
with new value of different type!".
This PR skips the fold in that case.
This PR was assisted by AI but I reviewed all the changes.
[llvm] Remove unused private member variables (NFC) (#244121)
This patch removes unused private member variables across llvm/ that
are not referenced anywhere, including in constructor member
initializer lists. This patch also removes a private type alias and
several #include directives that become unused as a result.
Note that every removed member variable is default-constructed,
uninitialized, or zero-initialized without side effects.
Assisted-by: Antigravity
[SCEV] Drop samesign when removing a common addend in `SimplifyICmpOperands` (#244247)
When folding a common constant addend from both operands of a
comparison, ensure the `samesign` flag is dropped as well. The flag
describes the original `(K + A) pred (K + B)`, and since adding K may
change sign without necessarily wrapping (unless both additions are
nuw/nsw) the simplified operands may not have the same sign.
[libc] Add ns_sect, ns_class, and ns_type to <arpa/nameser.h> (#244242)
This patch adds the __ns_sect (ns_sect), __ns_class (ns_class), and
__ns_type (ns_type) enums to <arpa/nameser.h>.
Assisted-by: Gemini
[HLSL][202x] move __detail::bit_cast to hlsl namespace (#244007)
Move HLSL's bit_cast templates out of the __detail namespace and into
the hlsl namespace.
Reland PR: #243257
Assisted by Copilot GPT-6.1 Sol
[SimplifyCFG] Pass assumption cache to switch-to-select (#244221)
Also refactored the argument order of `simplifySwitchDefaultBranch` for
consistency: pass assumption cache first, then data layout, everywhere.
Fixes #221695.
config: switch suricata and rspamd to vectorscan (#522)
Hyperscan 5.4.2 has no fat runtime on FreeBSD so our build was
pinned to core2. Vectorscan selects SSE4.2, AVX2 and AVX-512
engines at runtime instead.
[AMDGPU] Register async barrier warning option during parser initialization
Keep the warning flag in constant-initialized storage and register its
command-line option in LLVMInitializeAMDGPUAsmParser. This avoids a
file-scope cl::opt destructor rejected by -Werror=global-constructors
while retaining the default warning and explicit opt-out.
[AMDGPU] Warn about missing async barrier replay workarounds
Warn by default when assembly lacks the recognized EXEC-zero B8 replay
after an async barrier arrival. Keep recognition within a straight-line
assembly block and support targeted and general warning controls.
Merge tag 'nfsd-7.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux
Pull nfsd fix from Chuck Lever:
- Unlock the correct parent directory after CREATE crosses a mount
* tag 'nfsd-7.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
nfsd: unlock the locked parent after crossing a mount in CREATE
SelectionDAG: Track ScheduleDAGRRList live registers in a SparseSet (#244028)
Schedule() allocated and zeroed two arrays of getNumRegs() + 1
pointers for every block, 333 KB on AMDGPU, even though only a few
registers are live at once. Keep the live registers in a SparseSet
instead. This also stops CheckForLiveRegDefMasked from skipping the
last register.
radeonsi shader-db compile time: -1.8%
CTMark instructions:u, geomean: O3 -0.04%
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
SystemZ: Use inline regclass syntax in mir tests (#242453)
Also clean up unnecessary registers sections
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Merge main into users/mhalk/test/amdgpu-reserved-wwm-vgpr-regression
Resolve the conflict in rewrite-vgpr-mfma-to-agpr-reserved-wwm-vgpr.ll by
keeping this branch's version; #226213 only regenerated the old checks.
Assisted-by: Claude Opus 5.5
[SPIRV][NFC] Minor cleanup for NSDI type emission (#244204)
This is a NFC refactor for debug types that have no base type, such as
the pointee of `void *` or the base of `const void`.
Pointer, qualifier, enum and function-signature types now share one
helper that emits `DebugInfoNone` for the missing type, as they already
did.
`spirv-val` now accepts `DebugInfoNone` as a debug type operand
(https://github.com/KhronosGroup/SPIRV-Tools/issues/6744). The standard
might actually allow DebugInfoNone in all NSDI operands (see
https://github.com/KhronosGroup/SPIRV-Tools/issues/7025).
Co-authored-by: Cursor <cursoragent at cursor.com>
intrusion detection: pattern matcher "hs" is now provided by Vectorscan (#10953)
Suricata links against devel/vectorscan instead of devel/hyperscan
when built with the VECTORSCAN option. The value stays "hs" since
this is what Suricata calls it.
DAG: Move the atomicrmw to ISD opcode mapping into a helper
Add getAtomicRMWOpcode next to getICmpCondCode so the mapping can be
reused outside of SelectionDAGBuilder.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
x11/nvidia-driver{-devel}, x11/nvidia-kmod{-devel}, x11/linux-nvidia-libs{-devel}, graphics/nvidia-drm*-kmod{-devel}, x11/nvidia-settings, x11/nvidia-xconfig: Update to 620.73.04
Update to latest Production Branch of drivers 620.73.04:
https://www.nvidia.com/en-us/drivers/details/285519/
Linux counterparts for x11/linux-nvidia-libs:
https://www.nvidia.com/en-us/drivers/details/285520/
As this version is newer than exisitng New Feature Branch (NFB)
of drivers, update -devel variants to the same version, too.
PR: 300897
Differential Revision: https://reviews.freebsd.org/D61744