[AMDGPU] Pass the cast source to isKnownNonNull in lowerADDRSPACECAST
`lowerADDRSPACECAST` passes the cast node instead of its source to
`isKnownNonNull`. The cast node is never a frame index, a global address, or a
constant, so the check never succeeds, and SelectionDAG checks for null when it
casts an alloca or a global. At -O2 the `nonnull` flag that IR passes set on the
cast hides this, but at -O0 every such cast gets a compare and two selects. The
GlobalISel path already passes the source.
This PR was assisted by AI but I reviewed all the changes.
[NFC][AMDGPU] Add a test for casts of known non-null pointers at -O0 (#244286)
At -O0, SelectionDAG checks for null when it casts an alloca or an LDS
global to flat, but GlobalISel does not.
This PR was assisted by AI but I reviewed all the changes.
Revert "[CodeGen] Query AA in cross-iteration mode for machine instructions" (#244718)
Reverts llvm/llvm-project#226768
Breaks an AMDGPU test (`CodeGen/AMDGPU/asyncmark-stage.ll`) in premerge.
[Support] Vectorize the byte scan in StringRef::rfind (#242215)
Currently, `StringRef::rfind(StringRef)` forwards to
`std::string_view::rfind`, and neither standard library vectorizes it.
libstdc++ calls `memcmp` on the whole needle at every candidate
position. libc++ compares one byte at a time: before LLVM 22 it scans
forwards over the whole string for the needle's first character, keeping
the last match, and since then it walks backwards looking for the
needle's last character.
The linker calls it a lot on symbol names. In lld, `getRootSymbol` calls
`rsplit(".llvm.")` and `rsplit(".__uniq.")` on names that contain a `.`
when there is an order file. During LTO, `PGOIndirectCallPromotion` and
`CGProfilePass` build an `InstrProfSymtab`, whose `getCanonicalFnName`
calls `rfind(".llvm.")` and `rfind(".part.")` on every function name. A
Chromium ThinLTO link makes about 2.4 M of these calls.
## Design
[13 lines not shown]
[lldb] Pass the step-out return type through the language runtime (#244706)
Before giving a function's return type to the ABI plugin, ask the
language
runtime for the runtime type, as ValueObject does.
Downstream, the Swift language runtime needs this. The return type comes
from the type system of the function's module, which has no process, so
the
ABI plugin can't get the size of a type like Swift.Optional<Int> from
the
Swift runtime. The Swift language runtime returns the type from the
target's
scratch type system, which has a process.
assisted by claude
[lldb] Remove the legacy frame variable implementation (#243651)
DIL has been the default implementation of `frame variable` since
f5c676d6d95d, which shipped in LLDB 22 and 23. The old path expression
parser in LegacyGetValueForVariableExpressionPath is still reachable by
setting target.experimental.use-DIL to false, but nothing else selects
it, and the only tests that exercise it use it as a baseline to compare
DIL against.
This patch removes the legacy implementation and the use-DIL setting.
eDILModeLegacy is unaffected; it is a DIL mode that restricts the
grammar to what the old parser accepted, and does not use the old code.
Because the setting lives under target.experimental, LLDB silently
ignores attempts to set it, so existing scripts that set it keep
working.
Assisted-by: Claude
IR: Remove traces of less-precise-fpmad attribute (#244661)
Nothing reads this attribute. clang emitted it for -cl-mad-enable,
and the inliner had a merge rule for it, but no backend or optimization
ever used it.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Fix endless loop in udp_output() on 32 bit architectures.
As CMSG_ALIGN() can overflow the integer value, do the length check
with and without alignment.
from Acts1631; OK mvs@
RuntimeLibcalls: Add attributes to operator new and delete
Annotate operator new and delete implementation variants. The nothrow
variants are nounwind. No library registers these yet so they don't
appear in the DeclareRuntimeLibcalls tests.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
RuntimeLibcalls: Add attributes to ObjC runtime calls
Mark the ObjC runtime functions nounwind, and mark the argument of
the functions whose intrinsics mark their argument returned.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
RuntimeLibcalls: Add attributes to printf variants
Give the integer-only and size-optimized printf variants the
attributes of the corresponding printf functions.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Add a symlink_in_path util for the extent check
Review asked for a util in place of the inline openat2 check in the
iSCSI extent validation. symlink_in_path() returns whether a component
of a path is a symlink, checking up to the first one that does not exist.
Also type the capped safe_open reads as str. safe_open yields IO[Any],
so returning f.read() directly failed mypy --strict with no-any-return
in read_authorized_keys and get_known_hosts.
[RISCV][test] Move fround-optsize.ll to llvm/test/CodeGen/RISCV (#244707)
Fixes 4055d07d0933 (#243839).
The test was added under llvm/third_party/llvm/llvm-project/, so lit
never ran it.
Assisted-by: Gemini
[AMDGPU] Don't tie true16 load into d16_hi load (#244272)
With real true16, build_vector (load lo), (load hi) was still matched to
a 32-bit LOAD_D16_HI whose tied input is the low half. The low load is
selected to a _t16 load into the lo16 register, so the tied 32-bit use
looks like a read of that pending result and SIInsertWaitcnts puts a
wait between the two loads, e.g. on gfx11:
ds_load_u16_d16 v0, v1 offset:2
s_waitcnt lgkmcnt(0)
ds_load_u16_d16_hi v0, v1
The d16_hi load only writes the high half and does not read the low
half, so no wait is needed. When the low half is itself a load, skip the
match under real true16 and let both halves be selected as _t16 loads
into 16-bit registers. The hi16 one is emitted as the d16_hi encoding.
Other low-half sources (constants, VALU results) keep using the tied
form, which avoids an extra pack after the load.
Assisted-by: Claude Code:claude-opus-5-5
nix: pin nixpkgs-illumos c3d503e: an image of the proto area takes its SMF, man and boot files from it
Images made by tools/src_workspace image and tools/illumos_workspace
image took their SMF repository, whatis databases and loader files from
the Nix build rather than from proto, and had the Nix build's stages
built again for a checkout with changes; now they are made from proto,
and the stages are not built.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
Merge tag 'fuse-fixes-7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse
Pull fuse fixes from Miklos Szeredi:
- Fix bugs reported by Sashiko
- Fix a couple of issues introduced in this cycle
- Misc bug fixes
* tag 'fuse-fixes-7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
fuse: limit name size in listxattr
fuse: clear the old EOF tail before writeback-cache writes
fuse: fix UBSAN warning in fuse_iomap_writeback_range()
fuse: skip dcache instantiation for readdirplus names with embedded NUL
fuse: preserve ENOTCONN after failed initialization and disconnect
fuse: set dentry epoch before making the dentry visible
fuse: advertise support for DAX mappings
fuse: don't mark inode DAX without CONFIG_FS_DAX
[9 lines not shown]