[AMDGPU] Use a disjoint scope domain for noalias kernel arguments (#218770)
All noalias arguments of a kernel are disjoint with each other, so we
can use a disjoint scope to save on metadata construction.
AI disclosure: Claude wrote this, I looked at it and wrote this
message.
[compiler-rt][test] XFAIL suppressions-darwin.cpp on 27.0-27.2 iOS simulators
Certain calls from the simulator shared cache (e.g. to memcpy/memcmp/strlen)
are not interposable on 27.0-27.2 simulators, so ASan cannot intercept them
and this test fails.
rdar://193139172
[AMDGPU] Lower loads and stores for address space 13 (#209541)
Generate code for loads and stores in address space 13 (VGPR "as
memory"), which presents the
wave's vector registers as memory indexed by the pointer.
A whole-dword load or store becomes an `AMDGPUISD::REG_LOAD` /
`REG_STORE` node
(`G_AMDGPU_REG_LOAD` / `G_AMDGPU_REG_STORE` on GlobalISel) carrying the
dword index, which is the
pointer shifted right by 2, and an MMO, so alias analysis and the
scheduler treat it as the memory
access it is. These nodes select to one of two families of pseudos,
split the same way as the
`V_INDIRECT_REG_*_MOVREL` / `V_INDIRECT_REG_*_GPR_IDX` pseudos:
* Subtargets that use movrel: `V_LOAD_IDX_B<N>` / `V_STORE_IDX_B<N>`
have no index operand and
read M0. The patterns take the index as an `M0` input, so both selectors
emit the copy into M0
[48 lines not shown]
[AMDGPU][GlobalISel] Fix immediate offset overflow when splitting s.buffer.load
When we're splitting a very large (>128 bit) s.buffer.load into
128-bit buffer loads, we add offsets to each split load. Currently,
when dealing with ptr.s.buffer.load, the code wouldn't subtract enough
from the immediate offset, so that when we added that +128 or +256,
we'd overflow the 12-bit immediate, causing silent overflow.
This commit fixes the issue by correctly calling the offset
splitter with a "alignment" that ensures that all those intermediate
loads don't overflow.
This matches the behavior in SDag and RegisterBankInfo.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[Reland][DwarfDebug] Add applyDwarfVersion() so the targets like NVPTX can recompute the version-derived state (#243256)
`DwarfDebug` derives several settings such as DWARF64, accelerator table
kind, GNU TLS opcode, DWARF2
bitfields, segmented string offsets, .debug_macro, MinimizeAddr, and the
MCContext version and format from the DWARF version in its constructor.
A target that overrides the version after construction could change only
the MCContext value, leaving the rest
derived from a different version.
This change refactors this version-derived state into
DwarfDebug::applyDwarfVersion(unsigned), which the constructor calls and
a target subclass can call again. The version-independent part of the
constructor is unchanged.
`NVPTXDwarfDebug`, which always emits DWARF `v2`, calls this function to
set version 2.
This fixes a module with no "Dwarf Version" flag getting a v2 header
with v4 encodings (`DW_AT_data_bit_offset` instead of
[4 lines not shown]
[Clang] [CUDA] Support ADL kernel launches (#240947)
There are a few places where the parser checks if an identifier is the
callee of a function call by looking at the next token and checking if
it is a '('. This meant that kernel launches (where the next token is
'<<<' instead) were incorrectly not being treated as calls sometimes; in
particular, this led to ADL not functioning correctly with kernels
(https://godbolt.org/z/zbr9fPn8G).
This patch fixes that by checking for '<<<' alongside '(' where
relevant.
Fixes #45327.
Assisted-by: Codex
[dsymutil][test] Make pseudo-probe.test independent of od output format (#243925)
`pseudo-probe.test` matched the raw output of `od -t x1`, but the offset
column and the case of the hex digits are not portable. On z/OS, `od`
prints decimal offsets and uppercase hex, so the CHECK lines never
matched even though dsymutil produced the correct bytes:
```
0000000000 0C C1 75 B9 C0 F1 B6 A8 05 00 00 20 5C 85 5E 09
```
vs. the expected
```
0000000 0c c1 75 b9 c0 f1 b6 a8 05 00 00 20 5c 85 5e 09
```
Use `od -An -v -t x1` to drop the offset column, lowercase the output
with `tr A-F a-f`, and remove the offsets from the CHECK lines. The byte
[7 lines not shown]
Update icingaweb2 to 2.12.6 (the last version with the monitoring module included). In turn, import icinga-php-library (0.14.2) and icinga-php-thirdparty (0.12.1).
[ProfCheck] Set default of profcheck-annotate-mem-ops to false (#243961)
This was accidentally left on in the PR that landed it. Turn it off for
now until we get the failures low enough to enable by default and put
stragglers in profcheck-xfail.txt.
[flang-rt][bazel] Configure runtime capabilities for musl and Windows (#243799)
The Bazel Flang runtime assumes Linux glibc capabilities for every
target. Musl lacks execinfo.h, while Windows uses strerror_s instead of
strerror_r, so those target builds fail.
Found while adding Flang support to the
[@llvm](https://github.com/hermeticbuild/hermetic-llvm) BCR module, the
toolchain used by the LLVM Bazel overlay’s --config=hermetic-toolchain.
Refuse immutable flag changes on S3 bucket datasets
filesystem.set_zfs_attributes now refuses a request that sets or
clears immutable on the dataset of an S3 bucket, on one path or
recursively. The S3 service sets and clears that flag on the object
versions it retains. Other attributes can still be changed there.
A path above a bucket is not refused. Recursion stops at dataset
boundaries, so a change there never reaches the bucket.
The check covers every BUCKET layout bucket, as the write guards do.
Middleware's own flag changes on pool and encrypted dataset mount
points call the attrs utility directly and are not affected.
The new case in test_s3_bucket.py covers a set and a recursive clear
on the bucket, a change of another attribute, and a recursive change
from the parent dataset.
RuntimeLibcalls: Add signatures for the Darwin sincos stret functions
__sincos_stret and __sincosf_stret return a struct holding the 2
results. Describe the C struct return type in the signature table and
lower for the target ABI. This is a vector on x86-64 for float,
through memory on x86-32 and APCS ARM, and as a struct elsewhere.
This replaces the special case that built the types in C++. Ideally we
would be using the ABI library, but it's incomplete for most targets
and it requires some relayering to use here.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[AMDGPU] Lower -1.0 / x as fneg (rcp x) (#243129)
Lowering -1.0 / x to rcp (fneg x) pins the fneg to x's producer. After
DAGCombiner turns fma(1.0 / x, fneg y, z) into fma(-1.0 / x, y, z)
(see #199909), the fneg lands on e.g. a v_mul_f32 and forces VOP3
(+4 bytes) instead of being a free modifier on the fma.
Lower it to fneg (rcp x) and let the existing fneg combines place it.
Do the same in GlobalISel, where it also lets -1.0 / sqrt(x) form rsq.
Fixes #187482.
ARM: Expand atomic load/store orderings without barriers in IR
Targets without native atomics or barriers marked i32 ATOMIC_LOAD and
ATOMIC_STORE as Custom so it could change the lowering based on the
ordering. Orderings stronger than monotonic would use the legalizer's
expansion to ATOMIC_CMP_SWAP/ATOMIC_SWAP libcalls.
Make this ordering decision in the IR expansion hooks instead since
those are expressive enough to represent the ordering constraint. This
moves the handling to AtomicExpand instead of the DAG legalizer. This
is kind of a workaround, ideally the same hook would be used by both
paths. This allows setting accurate LibCall actions on
ATOMIC_LOAD/ATOMIC_STORE.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[SandboxVec][LoadStoreVec] Rename ScalarConstReinterpret to SameSizeReinterpret (NFC) (#243765)
Rename `ScalarConstReinterpret` to `SameSizeReinterpret` and update its
comments.
The class reinterprets the bits of a value as another type of the same
size. It is used to pack constants in `createConstantVector()`, and it
will also be used to unpack loads of mixed types in #236647, so the old
name no longer describes it.
No functional change.
Made with [Cursor](https://cursor.com)
Co-authored-by: Cursor <cursoragent at cursor.com>
[SandboxVec][DAG] Fix moveInstrNotifier on empty DAG (#243747)
This patch fixes a crash inside an assertion in the DAG move instruction
notifier, when the DAG was empty.
The fix is trivial: if the DAG is empty there is nothing to be done, so
we should early return.
[libc][math] Define C99 floating-point comparison macros in math.h.
Add `isgreater`, `isgreaterequal`, `isless`, `islessequal`,
`islessgreater`, and `isunordered` to `math-function-macros.h` using
the corresponding `__builtin_is*` intrinsics, along with C and C++
include unit tests.