[AArch64] Do not pass debug insn to liveness analysis (#198021)
Fix another stepBackward location.
Debug instructions must not affect liveness analysis. stepBackward has
an assertion failure on debug instructions after
https://github.com/llvm/llvm-project/pull/193104.
Signed-off-by: John Lu <John.Lu at amd.com>
[RISCV][MCA] Use the new infrastructure for SiFive P500 and P800's tests. NFC (#198016)
Some tests -- mostly vector crypto -- are kept for SiFive P800.
NFC.
[flang][NFC] Finishing touches on legacy lowering conversion (#197973)
At the beginning of legacy lowering conversion, some tests were
initially converted to emit FIR. After some discussion, it was decided
to revisit those tests and convert them to emit HLFIR. This change
completes that step and should be the final change in removing vestiges
of legacy lowering.
Assisted-by: AI
[lldb] Avoid unnecessary strlen of mangled names in ConstString (NFC) (#197995)
C++ mangled names are known to be quite long at times. This change makes
use of available length data, instead of using the `StringRef(const char
*)` constructor which calls `strlen`.
The main detail is to replace `selectPool(llvm::StringRef(raw))` with a
call to `selectPool` using a readily available StringRef.
net80211: define a type for rssi values
Due to net80211 keeping values in 0.5dBm relative to the noise floor
an int8_t is not good enough to prevent a double wrap around, which
means the reported rssi values can be wrong (see D50928 or likely
a commit in the future for more information).
In order to address the problem and not break the userspace API,
start by defining a type within the kernel and use that. In a
next step we will then update the int8_t to int16_t to avoid the
problem up to the ioctl code. This will then allow us to work
on the the user space API indepedently (see PR 293016 for possible
impact outside the base system).
No functional changes intended.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D57021
wtap: use typed rssi and noise floor values
Adjust the rssi and nf arguments to typed int8_t and adjust the maths
for rssi to be consistant with what net80211 expects.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: lwhsu, adrian
Differential Revision: https://reviews.freebsd.org/D57020
Merge tag 'v7.1-rc4-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6
Pull smb client fixes from Steve French:
- Fix integer overflow in read
- Fix smbdirect error cleanup
- Multichannel reconnect fix
- Add some missing defines and correct some references to protocol spec
- Fix oob symlink read
* tag 'v7.1-rc4-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
smbdirect: Fix error cleanup in smbdirect_map_sges_from_iter()
smb: client: avoid integer overflow in SMB2 READ length check
cifs: client: stage smb3_reconfigure() updates and restore ctx on failure
smb/client: fix possible infinite loop and oob read in symlink_data()
SMB3.1.1: add missing QUERY_DIR info levels
[libc] Reduce number of iterations in threading tests. (#198030)
Previously the threading tests were running noticeably slowly and
causing flakey timeouts on some buildbots (e.g.
https://lab.llvm.org/buildbot/#/builders/71/builds/48420)
Merge tag 'ceph-for-7.1-rc4' of https://github.com/ceph/ceph-client
Pull ceph fixes from Ilya Dryomov:
"An important patch from Hristo that squashes a folio reference leak
that could lead to OOM kills in CephFS and a number of miscellaneous
fixes from Raphael and Slava.
All but two are marked for stable"
* tag 'ceph-for-7.1-rc4' of https://github.com/ceph/ceph-client:
libceph: Fix potential null-ptr-deref in decode_choose_args()
libceph: handle rbtree insertion error in decode_choose_args()
libceph: Fix potential out-of-bounds access in osdmap_decode()
ceph: put folios not suitable for writeback
ceph: add ceph_has_realms_with_quotas() check to ceph_quota_update_statfs()
libceph: Fix potential out-of-bounds access in __ceph_x_decrypt()
ceph: fix BUG_ON in __ceph_build_xattrs_blob() due to stale blob size
ceph: fix a buffer leak in __ceph_setxattr()
libceph: Fix unnecessarily high ceph_decode_need() for uniform bucket
libceph: Fix potential out-of-bounds access in crush_decode()
[CIR] Cast global var address to declared type at dtor call site
A C++ global with a constexpr default constructor that fixes the active member of a union — `std::basic_string`'s SSO `__short` variant is a common example — has a `cir.global` whose stored record type is the narrowed shape of that active variant. Classic CodeGen does the same (`@g = global { { { [16 x i8] } } } zeroinitializer`) and accepts the resulting `__cxa_atexit(@D1, @g, ...)` because LLVM IR uses opaque pointers. CIR has typed pointers, so the `cir.call` registering the destructor for `__cxa_atexit` carries an operand type that doesn't match the dtor's `this` parameter. This trips 16 libcxx tests and 71 cases total across libcxx, MultiSource, SingleSource, and SPEC in our build.
`verifyPointerTypeArgs(oldF, newF, userMap)` in `CIRGenModule::applyReplacements` (`clang/lib/CIR/CodeGen/CIRGenModule.cpp:1700`) catches this when ctor-dtor aliases are enabled and D1 is RAUW'd by D2. Without aliases, the `cir.call` op verifier rejects the same operand-type mismatch directly.
The fix mirrors the cast pattern `emitGlobalVarDeclLValue` (`clang/lib/CIR/CodeGen/CIRGenExpr.cpp:441-445`) already uses for every AST-level reference to a global: bitcast the result of `getAddrOfGlobalVar` to `convertTypeForMem(type)` before any typed-pointer op consumes it. `getAddrOfGlobalVar` itself stays raw so callers that walk to the underlying `GetGlobalOp` via `getDefiningOp()` keep working.
`global-dtor-union-narrowed.cpp` pins the CIR bitcast, the lowered LLVM helper-wrapped `__cxa_atexit`, and the equivalent OGCG direct `__cxa_atexit`.
[clang] remove lots of "innocuous" addrspacecasts (#197745)
These originally added many addrspacecast early on, where often it
wasn't needed, or could be added later. This makes these fairly
straightforward to remove (other than changing some tests). By swapping
all calls to this function (except the intended semantic ones for
parameters and variables) with the uncasted version, AMDGPU will
eventually not need to attempt to apply a fix up afterwards by having
different addrspace maps. This PR does not yet fix all calls, but the
main ones that might have been missed are in matrix/vector extensions
(which seem to weirdly override the memory type for temporary values to
be different from the type of the object in all other uses).
Fix dynamic map iterator target data lowering
Hoist runtime-sized offload map array allocation for regional target data with
iterator modifiers so the dynamic count and arrays dominate both begin and end
runtime calls.