x11/xconfig: Update to 3.7
Fixes offline NVIDIA driver installs from the XDrivers repo and
detects XLibre correctly when xconfig runs from rc.d at boot, so the
xlibre-nvidia-driver package is chosen instead of nvidia-driver.
Fix offline NVIDIA install and X server detection at boot
pkg add has no -r option, so installing from the XDrivers repo always
failed. Use pkg install -r XDrivers instead.
When started from rc.d, PATH lacks /usr/local, so Xorg was not found,
the X server was reported as unknown and the Xorg nvidia-driver was
installed instead of xlibre-nvidia-driver. Set a full PATH, and fall
back to checking the installed server package.
Ship NVIDIA EGL dependencies in the XDrivers repo
The 580 and newer NVIDIA drivers need egl-wayland2, which was missing
from the offline XDrivers repo, so offline installs failed and fell
back to the network. Match egl-wayland (which also catches
egl-wayland2) when building the repo, and drop egl-wayland from the
driver package list since it is now installed only with NVIDIA drivers.
[clang-repl] Print the device module IR under -emit-llvm (#235803)
Under -emit-llvm, Interpreter::Parse prints the module of each host PTU.
The device PTU of the same input is parsed first and compiled into the
offload binary, and its IR is never printed.
Print the device module when the device CompilerInstance runs
-emit-llvm, after its PTU is registered and before the offload binary is
generated.
A lit test checks that clang-repl --cuda prints the device IR of a
kernel before its host stub. A unittest checks that the device IR is
printed without a CUDA toolkit
[libc] Use a syscall wrapper for `epoll_wait` (#236063)
This PR move `epoll_wait` behind the centralized syscall wrappers,
following `libc/docs/dev/syscall_wrapper_refactor.md`.
[OpenMP] Switch the underlying type of llvm::omp::Version to int
It was unsigned before. The goal is to unify Version and VersionRange,
and VersionRange stores versions as int.
[SCEV] Drop samesign in getLoopInvariantPredicate
SCEV's getLoopInvariantPredicate tries to replace a comparison of an IV
against a loop-invariant value with the comparison value on loop entry.
For that it tries to prove that the comparison is:
- (A) monotonic: i.e. if c_i is true, then c_{i+1} is true,
- (B) guards the backedge: the backedge is taken only if c_i is true.
Then each c_i may be replaced with c_0.
It works for the icmp instruction without the samesign flag.
With the samesign flag, however, the comparison is poison when its
operands have different signs.
To prove the backedge guard (B), we may rely on picking that poison as
true, while proving the monotonicity (A) may need the same poison
to be picked as false.
[27 lines not shown]
[OpenMP] Replace cast operator with member function
Replace the explicit cast operator to the underlying type with a
member function "value()" that returns the underlying value.
[mlir][X86] Fold VNNI operand unpacking into contractions (#232800)
Matmul loops often transpose and flatten a VNNI-packed RHS before
`vector.contract`, hiding the packed lanes from the X86 AMX lowering
patterns and preventing the contraction from being lowered to an AMX dot
product (nanokernels).
- Adding a contract-loop preparation pattern for bf16 and i8 matmul
loops where the RHS is unpacked using a transpose and shape cast.
- Reading the RHS in packed VNNI layout and contract over the K and
VNNI-lane dimensions, preserving fastmath attributes.
- Supporting already-packed and flat RHS reads, leading unit dimensions,
and dynamically sized innermost dimensions.
- Rejecting layouts that cannot be packed safely.
In follow-up PRs we could add more normalization patterns:
- Accepting other/similar pattern expressing the same (like generated by
triton-cpu)
- CanonicalizeLoopIV: Fold exact round-downs and safe casts so reads can
use the loop IV directly.
[3 lines not shown]
[IndVarSimplify][NFC] Add tests for loop-invariant samesign compares
Add tests for replacing a samesign compare of an IV with a
loop-invariant value by its value on loop entry.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
amd64: Make the SYSENTER and INTn action same as for IDT case.
Fixes: 6e93f5e4d693 ("amd64: FRED support")
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
amd64: do not pass SYSENTER frame to FRED fast syscall handler
With FRED, SYSCALL is delivered as event type syscall (7) and vector 1.
SYSENTER is syscall with vector 2. Handle SYSENTER in slow path,
otherwise 32bit code is able to execute 64bit syscalls.
Also check that SYSCALL comes from the 64bit mode. Intel already
specifies that SYSCALL causes #UD in compatibility mode, but there is no
AMD specification for SYSCALL under FRED yet, and SYSCALL is allowed
in compatibility mode on AMD with IDT event delivery.
Fixes: 6e93f5e4d693 ("amd64: FRED support")
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
amd64: fixes for register handling of syscall entry for FRED
- Save %r10 into tf_rcx. This is the location for the 4th arg.
libsys stubs do 'movq %rcx, %r10' so the fast syscall path works
as is. But Go binaries directly put arg 4 into %r10.
Also save %r11 into tf_r11 for the duration of syscall handler.
- Somewhat improve binary compatibility with IDT SYSCALL fast return,
by copying userspace return %rip into %rcx, and %rflags into %r11,
emulating SYSCALL IDT delivery.
Fixes: 6e93f5e4d693 ("amd64: FRED support")
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
amd64: do not allow to set IOPL to 3 when FRED is used
SDM requires that IOPL is zero when returning to usermode with ERETU.
Do not set rflags.iopl for FreeBSD io(4) open.
This might be changed to disallow io(4) open for FRED at all with a
knob, if there is a real need.
Return ENOSYS from linux iopl(2), apparently Linux kernel can be
configured without iopl(2) support, so linux programs should be prepared
for this error.
Return EINVAL from vt(4)/syscons(4) ioctl(KDENABIO).
Fixes: 6e93f5e4d693 ("amd64: FRED support")
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
amd64_cpu_init_fred(): set stack level for NMI and not #NM
Fixes: 6e93f5e4d693 ("amd64: FRED support")
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
[AArch64][llvm] Fix incorrect diagnostic (index/immediate in simm9) (#229563)
Improve the error message in the simm9 diagnostics and use the
correct word `immediate` instead of `index`. This was noticed when
creating the `CFLT` instructions for Armv9.8-A, but would have
caused a lot of unrelated churn if merged as part of that change.
Co-authored-by: Martin Wehking <martin.wehking at arm.com>
[NFC][CIR][AMDGPU] Build fence scope triple from enums (#235907)
Drop the legacy amdgcn-amd-amdhsa string, matching how OffloadArch and
SPIR targets build the AMDGPU triple
[OpenMP] Switch the underlying type of llvm::omp::Version to int
It was unsigned before. The goal is to unify Version and VersionRange,
and VersionRange stores versions as int.