Test scalar-buffer alignment across a dword carry #3919
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3919"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by akimfomin on 2026-11-30T11:36:27Z.
What it tests
Adds a generated Windows WARP regression for
s_buffer_load_dwordafter #3894 by @eleboucher. It exercises five SGPR offsets plus immediate 1, including3 + 1and7 + 1crossing a dword boundary, with both the constant-buffer and raw descriptor-twin translations.This is stacked on the exact #3894 head
844200e9. Only the test commit is new to that branch. Please keep this draft until #3894 lands and the series is checked against main.Validation
@eleboucher thanks for offering to review and verify the fixture on your 4070 Ti SUPER. Windows WARP command:
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by eleboucher on 2026-11-30T11:52:40Z.
Review: COMMENTED
Ran it on the RTX 4070 Ti SUPER box (Windows WARP), with the test binary cross-built from the PR head
039b3e0d:039b3e0d(#3894 + this test):scalar_buffer_load_aligns_after_adding_dynamic_and_immediate_offsets,table_constant_buffers_read_as_raw_bytes_through_their_twinsandscalar_load_clears_the_two_low_address_bitsall pass.main41adb551(without #3894) also passes.So as written, the fixture does not distinguish the fixed lowering from the old one. Two likely reasons:
The review of the test itself is fine: the offset reaches the program as a root constant per dispatch, and
want = data[(s0 + imm) / 4]matches the ISA rule (offset and SOFFSET added, then the two LSBs ignored). To make it a regression test, it needs to observe the address rather than the data: assert on the emitted IR that the offset intorawBufferLoadis masked, asscalar_load_clears_the_two_low_address_bitsdoes, or arrange that an unmasked address reads a different dword on WARP (if WARP's raw-buffer path does not round, a misalignedLoadwould show it; I did not verify that).Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by akimfomin on 2026-11-30T12:04:46Z.
@eleboucher Thanks for checking the negative control. I agree that the WARP result verifies the returned values but cannot show whether the compiler passed an unaligned byte address to the raw load. I have added a generated lowering check that evaluates that exact operand over the five offsets, using the existing address-value test helper. I’m verifying that it passes on #3894 and fails at the intended address assertion on plain main before updating the draft.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.