[AMDGPU] Support FLAT_SCRATCH in SILoadStoreOptimizer const offset promotion (#212507)
Add a 32-bit base/offset extraction path for the V_ADD_U32_e64 pattern
used by FLAT_SCRATCH vaddr and enable promoteConstantOffsetToImm for
FLAT_SCRATCH instructions that have a vaddr operand.
devel/google-cloud-cpp: Update to 3.13.0
- opentelemetry-cpp is now a required dependency; crc32c is no
longer used (Abseil's implementation is used instead).
- Drop CMake options that are no longer used by 3.x.
- Use GOOGLE_CLOUD_CPP_OVERRIDE_GOOGLEAPIS_URL to point at the
googleapis distfile instead of copying it into the build tree.
- Add patches to use opentelemetry::nostd for opentelemetry-cpp
types; upstream assumes opentelemetry-cpp is built with WITH_STL,
which our devel/opentelemetry-cpp is not.
Changes: https://github.com/googleapis/google-cloud-cpp/blob/v3.13.0/CHANGELOG.md
[SandboxVec][LoadStoreVec] Add Reinterpret::reinterpretValue
Mixed-type load unpacking is the first caller. Insert the ptrtoint /
bitcast / inttoptr chain before the unpack point, and return nullptr
when a non-integral pointer is involved.
[SandboxVec][LoadStoreVec] Support mixed-type load vectorization
Remove the restriction that every load in a top-level load chain must
have the vector's element type. A chain of mixed types such as
{i32, float} or {double, i32, i32} is loaded as a vector of integers
(as chosen by VecUtils::getCombinedVectorTypeFor()), each original load
is unpacked from the lanes it occupies, and then reinterpreted back to
its own type with Reinterpret::reinterpretValue().
Chains involving a non-integral pointer are left alone, since such a
pointer cannot be recovered from an integer lane.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[SandboxVec][LoadStoreVec] Split Reinterpret legality from cast-chain building
canReinterpret() only checks for non-integral pointers, and getCastChain()
builds the ptrtoint/bitcast/inttoptr sequence under that precondition.
The chain is at most three casts, so assert that. Drop the unused runtime
reinterpretValue(); mixed-type loads will add it with tests.
Co-authored-by: Cursor <cursoragent at cursor.com>
[AMDGPU[ Expand `av` built-ins and intrinsics to b16/b32/b64
They previously only supported b128, but there is no technical reason why we cannot support all bit widths.
Disclaimer: This is largely Claude assisted. I ran it in short self-contained bursts (to ensure the output of each step was reviewable) to do all the boring steps of plumbing this through the stack. I also manually reverified and cleaned up all the files one by one between each steps.
Assisted-by: Claude Opus 5.5
[SandboxVec][LoadStoreVec] Add LLVM_ABI annotations to Reinterpret
Export the out-of-line static members of Reinterpret, as reported by
the LLVM_ABI annotation check. getCastChain() is private but is called
from the inline canReinterpret(), so it needs to be exported too.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[SandboxVec][LoadStoreVec] Don't pack non-integral pointer constants
getEquivalentConstantWithType() only rejected a non-integral pointer
destination type (via an assert), while a non-integral source such as
'ptr addrspace(5) null' was silently converted with ptrtoint. A
non-integral pointer has no stable integer representation, so it cannot
be packed into an integer lane.
Add VecUtils::isNonIntegralPtr() and return nullptr from
getEquivalentConstantWithType() when either type is a non-integral
pointer, which makes createConstantVector() give up on the bundle.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[SandboxVec][LoadStoreVec] Add Reinterpret helper for same-size type casts (NFC)
Replace getEquivalentConstantWithType() with a Reinterpret utility that
reinterprets the bits of a value as another type of the same size. It
builds a chain of ptrtoint / bitcast / inttoptr casts, and applies it
either to a constant (folding) or to a runtime value (inserting casts).
The runtime form will be used to unpack mixed-type vector loads and to
pack mixed-type store operands.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>