[InstCombine] Preserve disjoint or after folding casted bitwise logic (#136815)
Optimize
`or disjoint (zext/sext a) (zext/sext b))`
to
`(zext/sext (or disjoint a, b))`
without losing disjoint.
Confirmed here: https://alive2.llvm.org/ce/z/kQ5fJv.
[CMake] Do not set CMP0116 explicitly to old (#90385)
CMP0116 was originally set to old to get rid of warnings. However, this
behavior is now set to new by default with the minimum CMake version
that LLVM requires so does not produce any warnings, and setting it
explicitly to old does produce a warning in newer CMake versions. Due to
these reasons, remove this check for now.
Splitting off from removing the CMP0114 check just in case something
breaks.
Partially fixes #83727.
Fix le(4) match routine to probe the address specified in config(5).
No functional changes with current kernel config files.
Also apply cosmetic changes:
- use proper variable name per examples in the bus_dma(9) man page
- fix an incorrect comment
Patch from Miod Vallat.
[AtomicExpand] Add bitcasts when expanding load atomic vector
AtomicExpand fails for aligned `load atomic <n x T>` because it
does not find a compatible library call. This change adds appropriate
bitcasts so that the call can be lowered.
commit-id:f430c1af
[SelectionDAG][X86] Remove unused elements from atomic vector.
After splitting, all elements are created. The elements are
placed back into a concat_vectors. This change extends EltsFromConsecutiveLoads
to understand AtomicSDNode so that its concat_vectors can be
mapped to a BUILD_VECTOR and so unused elements are no longer
referenced.
commit-id:b83937a8
[SelectionDAG][X86] Split via Concat <n x T> vector types for atomic load
Vector types that aren't widened are 'split' via CONCAT_VECTORS
so that a single ATOMIC_LOAD is issued for the entire vector at once.
This change utilizes the load vectorization infrastructure in
SelectionDAG in order to group the vectors. This enables SelectionDAG
to translate vectors with type bfloat,half.
commit-id:3a045357
[X86] Manage atomic load of fp -> int promotion in DAG
When lowering atomic <1 x T> vector types with floats, selection can fail since
this pattern is unsupported. To support this, floats can be casted to
an integer type of the same size.
commit-id:f9d761c5
[SelectionDAG][X86] Widen <2 x T> vector types for atomic load
Vector types of 2 elements must be widened. This change does this
for vector types of atomic load in SelectionDAG
so that it can translate aligned vectors of >1 size. Also,
it also adds Pats to remove an extra MOV.
commit-id:2894ccd1
[X86] Add atomic vector tests for unaligned >1 sizes.
Unaligned atomic vectors with size >1 are lowered to calls.
Adding their tests separately here.
commit-id:a06a5cc6
IR/Verifier: Allow vector type in atomic load and store
Vector types on atomics are assumed to be invalid by the verifier. However,
this type can be valid if it is lowered by codegen.
commit-id:72529270
[SelectionDAG] Legalize <1 x T> vector types for atomic load
`load atomic <1 x T>` is not valid. This change legalizes
vector types of atomic load via scalarization in SelectionDAG
so that it can, for example, translate from `v1i32` to `i32`.
commit-id:5c36cc8c
[mlir][gpu] Fix breaking constructor from GPUSubgroupSizeToROCDL (#137439)
This PR addressed a bug from llvm/llvm-project#137360. which was using
GPUSubgroupSizeToROCDL to patterns function that do not have a valid
constructor for it. This is causing compilation error below:
error: constructor inherited by 'GPUSubgroupSizeOpToROCDL' from base
class 'ConvertOpToLLVMPattern<mlir::gpu::SubgroupSizeOp>' is implicitly
deleted
Signed-off-by: Stanley Winata <stanley.winata at amd.com>
libpmcstat: fix pmcstat -G on older-ish -CURRENT w/ drm-kmod
The linuxkpi_gplv2.ko module on older-ish -CURRENT had absolutely no
.text contents, but it was still loaded. Instead of hitting the later
assertion because 0 is not less than 0, we can just skip images like
this as we should not have any samples from them.
Reviewed by: gallatin
(cherry picked from commit 77721403c91d67dbfd5a2c5c667e7f5d87acb3f6)
libbe: attempt to remove autocreated mountpoints at unmount time
We use a be_mount.XXXX pattern to mkdtemp(3) when creating these, which
seems reasonably unique enough to just continue using that. Record the
mountpoint of the root dataset and check the dirname of that for the
auto-creation trait. There's no sense in this bubbling up an error to
callers, so we'll just ignore an error for now.
Requested by: manu
(cherry picked from commit d6fbae084a2a0e07805633ca46935963357f1efa)
time: switch to fences for siginfo_recvd
This effectively reverts
6e824f3713011 ("time: siginfo_recvd needs to be marked volatile")
because it was actually wrong. Switch to C11 signal fence, which
provides a compiler barrier that will do the right thing.
Reported by: kib
Reviewed by: kib (slightly earlier version)
(cherry picked from commit df1b0f580d3dc4dd165d84fbcc14d0eebd8ee2c4)
libc: locale: fix EUC shift check
wchar_t is unsigned on ARM platforms, and signed pretty much everywhere
else. On signed platforms, `nm` ends up with bogus upper bits set if we
did in-fact have a valid CS2 or CS3 (MSB set). Mask just the low byte
to avoid sign bit garbage.
Bare basic test of converting a CS2 widechar in eucCN, which would
previously kick back an EILSEQ.
Reviewed by: bapt, rew
Sponsored by: Klara, Inc.
(cherry picked from commit c4c562eadf3b790fa221e220d6a442f0cb84ca35)
wireguard-tools: ipc: freebsd: use AF_LOCAL for the control socket
AF_INET assumes that IPv4 is built into the kernel, but it's completely
valid to build a kernel without it. unix(4) sockets, on the other hand,
are not-optional in the kernel build. Given that interface ioctls can
be invoked on any kind of socket, switch to the safer one to avoid
breaking on IPv6-only kernels.
Reported and tested by: ivy
(cherry picked from commit 0d238bc50d453d7ac29476fa71edd1fc9a5fbbf9)
tee: minor cleanup
Pull the open flags out of the loop into a local var. They won't be
changing, so this is marginally more readable.
Adds some extra brackets around the loop in preparation for a future
change that may try to fallback to opening the path as a socket if we
get an EOPNOTSUPP.
No functional change.
Reviewed by: asomers, des, emaste, ngie
(cherry picked from commit 414c2b8d1e5abe7186c1aa4dc3ab28147ce46f47)
tee: add some basic tests
The cases are ordered in such a way that we naturally progress through
the functionality, with the earliest failures perhaps shedding light on
any later failures.
sysutils/porch is used for one test if it's available, just to cleanly
check that SIGINT is being ignored properly.
Reviewed by: des, emaste
(cherry picked from commit 85ff0b08ee699ff323404727998993275b4d2e2a)
bintrans: disable argument permutation for qp and base64
Err on the side of caution and revert to the BSD-style getopt(3)
behavior for argument processing, as it's harder to go back and it's
not clear that this was strictly intentional.
This is the difference between allowing `base64 /COPYRIGHT -w 80` and
forcing `base64 -w 80 /COPYRIGHT`.
Reviewed by: emaste, pstef
(cherry picked from commit d8fd551438706b3766da23e72ef077945ba43cd3)
wg: Improve wg_peer_alloc() to simplify the calling
Move the necessary extra logics (i.e., noise_remote_enable() and
TAILQ_INSERT_TAIL()) from wg_ioctl_set() to wg_peer_alloc(), and thus
make it easier to be called. Actually, the updated version is more
asymmetric to wg_peer_destroy() and thus less likely to be misused.
Meanwhile, rename it to wg_peer_create() to look more consistent with
wg_peer_destroy().
Reviewed by: aly_aaronly.me (diff), markj
Obtained from: DragonflyBSD 902964ab24ba (with some changes)
(cherry picked from commit 7121e9414f294d116caeadd07ebd969136d3a631)
tests/kernel/Makefile: Add DPSRCS for t_execregs.c parts.
We build it with -DHAVE_EXECREGS_TEST if arch/.../execregs.h exists;
this way if you add it for a new architecture and do an update build,
t_execregs.c will be recompiled with the macro defined so it will
pick up the new stuff automatically.
PR kern/59084: exec/spawn leaks register content