[NVVM][NVPTX] Support spcompress and spdecompress intrinsics (#221751)
This change supports `spcompress` and `spdecompress` intrinsics and
their lowering to the NVPTX backend.
graphics/zeno: Unbundle bullet, build with base clang, fix runtime crashes
* Use bullet from devel/bullet instead of the bundled zenustech/bullet3
fork. The fork was built as shared libraries (it forces
BUILD_SHARED_LIBS=ON) that libzeno.so linked against but which were
never installed, so libzeno.so failed at runtime with
libBulletDynamics.so.3.17, libVHACD.so, libBussIK.so, ... not found.
Only the parts devel/bullet does not provide (BulletInverseDynamics
headers, BussIK, VHACD, URDFImporter) are still taken from the fork
and compiled directly into libzeno.so. The single precision flavor
is required (zeno assumes btScalar is float), so the build stops
early when bullet-double is installed.
* Build with base clang instead of GCC. Mixing libstdc++ with Qt5 and
the other dependencies built against libc++/libcxxrt crashed
zenoedit in __dynamic_cast as soon as a node was added. The
--allow-shlib-undefined -lomp workaround is no longer needed.
Added a patch for the only clang build error (PrimUnmerge.cpp).
[13 lines not shown]
[AArch64] Implement CRC32 const folding (#228985)
This implements constant folding for `__crc32` intrinsics when both the
arguments are compile time known constants.
This is a follow up of https://github.com/llvm/llvm-project/pull/219452
which does the same for X86.
[PassManager] Factor out some common code to a utility function (NFC) (#229432)
There are two places containing common code where module inlining is
added to the ModulePassManager, with a third one coming up.
This commit factors out the common code into a utility function to
reduce duplication.
[InstCombine] Remove target specific sext(trunc(...)) combine tests. NFC
Follow up to https://github.com/llvm/llvm-project/pull/227321#issuecomment-6055905388
t0 already exists in the generic test file, t1 was moved over as "ashr_signbits". A new RUN line has been added for a datalayout with a native i32 type to exercise the change in #227321
CodeGen: Run LiveIntervals before PHIElimination and drop LiveVariables from it
Move LiveIntervals to run before PHIElimination in the optimized register
allocation pipeline, and make PHIElimination maintain LiveIntervals only.
This removes the last explicit use of LiveVariables. The actual analysis is no
longer used. There are implicit dependencies on the side effects of running the
analysis due to adjustments of dead flags, so further work is still needed to
complete the removal.
This perturbs register allocation in a number of tests. The same codegen result
can be achieved by not preserving the analysis and recomputing fresh. Greedy is
just sensitive to the exact slot index and value numbering with identical MIR.
Measured across every affected test the emitted instruction count goes from
145124 to 145196, +0.050%, with changes in both directions. The largest
regression is AArch64/phi.ll, where the GlobalISel output gains about 30
instructions and no longer matches the SelectionDAG output; the largest
improvements are ARM/fpclamptosat.ll and PowerPC/common-chain.ll.
[2 lines not shown]
MC: Error if target did not register null streamer
Without this the AsmPrinter would see a null pointer
for the target streamer. More than likely this is just
going to crash. Only 5 of the in tree targets properly
registered a null streamer before I started looking into this.
The rest had randomly, inconsistent null checks for the streamer.
There are still a few targets not registering this, which should
update (some of which seem to not make use of the TargetStreamer).
There's no reason to leave this as a silently hazardous edge case.
[DAGCombiner] Add tests for zero-extended low-bits masks (NFC) (#229981)
A low-bits mask built in a narrow type and zero-extended into a wider
and, (and X, (zext (not (shl -1, Y)))), with and without other uses of
the mask, on AArch64, X86 and RISC-V (with and without Zbb).
Assisted-by: Claude Code
[cmake] Properly link against LLVM components (#224624)
The proper way to reference LLVM components is to pass them via the
LLVM_LINK_COMPONENTS variable. This is needed when building LLVM as a
dylib, so the proper dependency (the LLVM library) is passed.
This does not apply to plain add_executable() targets, which should
manually select to link against LLVM or individual LLVM components.
The effort to build LLVM as a dylib is tracked in #109483.
[flang][OpenMP] Do not set nuw on canonical loop trip count span (#229776)
lb <= ub is a signed comparison and does not imply that ub - lb does not
wrap as unsigned (e.g. when lb is negative and ub is not), so the nuw
flag on the span computation could produce poison.
Fixes https://github.com/llvm/llvm-project/issues/229739
[SPIRV] Emit each debug scope from getOrCreateDebugScope.
Handlers return the opcode and the operands. getOrCreateDebugScope writes that instruction with a fresh id.
[SPIRV] Forward-reference debug scopes with a reserved result id.
Visiting a scope reserves its result id. With SPV_KHR_relaxed_extended_instruction a back edge uses that id through OpExtInstWithForwardRefsKHR, and a later failure defines it as DebugInfoNone when an emitted instruction already named it.
Without the extension the edge is dropped and a later walk can retry the scope.
AMDGPU: Migrate more tests off of -amdgpu-scalarize-global-loads=false
Index loads by workitem id in memory and call related tests. Convert the
scalar_to_vector tests to functions.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[lldb][Windows] Support paths longer than MAX_PATH in FileSystem (#229727)
`FileSystem::Open` passes the converted path straight to `_wsopen_s`,
which rejects a path longer than `MAX_PATH` unless it carries the
`"\\?\"` prefix.
Since llvm#227373, `GetExecutableForProcess` strips that prefix from the
image path. When lldb-server attaches to a process created with a long
path, `NativeProcessWindows` keeps that architecture and the first
register context asserts:
```
Assertion failed: target_arch.GetMachine() == llvm::Triple::x86_64,
file ...\RegisterContextWindows_x86_64.cpp, line 138
```
This causes `functionalities/longpath/TestLongPath.py`
(test_attach_with_long_path) to fail on https://ci-external.swift.org/.
[2 lines not shown]
[lldb][Windows] Fix lldb-server exit deadlock with pipe-mode stdio (#227273)
When the inferior exits, lldb-server waits for its stdio reader thread
before letting the exit finish, so the inferior still holds the pipe
open and `EOF` can never arrive.
In pipe mode, closing the pipe only cancelled a read that was already in
progress. A read that started right after was retried at every 5 s
timeout, so lldb-server waited forever and never reported the exit.
On Windows CI this shows up as tests that continue the inferior to its
exit timing out after 600 s, and as `TestGdbRemoteExitCode` timing out
waiting for the exit reply.
Closing the pipe now also stops the reader from starting another read,
and lldb-server wakes the reader so it notices the close right away
instead of at its next timeout.
rdar://188700912
[X86] Add mayFoldIntoScalarInteger helper. NFC. (#230037)
Similar to existing mayFoldIntoVector - checks if node can be freely
representable on GPR(s).
Update combineSelect f16/bf16 handling to use it instead of its own
tests.
[flang] Do not set nuw on RESHAPE index arithmetic involving lower bounds (#229733)
The no-unsigned-wrap flag set on the builder by the RESHAPE inlining was
also applied to the lower bound adjustments generated when accessing
ARRAY, SHAPE and PAD elements, which is invalid when lower bounds are
zero or negative. Use nsw by default and only keep nuw on the linear
index computations.
Fixes #229709
Assisted-by: AI
Gate SMB block cloning and Veeam shares on SMB_BLOCK_CLONING
This commit adds changes to replace the SMB_FASTPATH and SMB_VEEAM license features with a single SMB_BLOCK_CLONING feature, which gates the ZFS block cloning and integrity streams smb.conf parameters as well as the VEEAM_REPOSITORY_SHARE purpose. Since block cloning applies to every share, entitlement usage reports it as in use whenever the SMB service is enabled and serves at least one enabled share.
(cherry picked from commit 340f3bf3ab1701c644c9f6c19234805bfbc4462b)