cpp-migration: accept inline, literal and SGPR-pair values in direct C++ 64-bit shifts #2951
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows#2951
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@Leyukaka on GitHub · 2026-11-26 22:59 UTC · original
Target branch
cpp-migration. Part of #2935 (instruction coverage). I am taking this; please say if you already have it locally and I will drop it.Gap: in the direct compute path,
v_lshrrev_b64andv_lshlrev_b64accept only a VGPR pair or the inline0as the shifted value (gfx1013_direct_compute.inl, "direct 64-bit shift operand"). Three forms are refused:v_lshrrev_b64 v[2:3], 0, -1, which writes an all-ones pair;Measured on a local capture (counts and instruction shape only). Occurrences are static counts up to each program's
s_endpgm.-1);compile_dxil --jobs 8 gfx1013-direct-cs@36 --requestsbuilt fromcpp-migrationplus #2950, 21 request keys stop first at this refusal, all on an inline-1.Plan: follow the rules
gfx2hlsl.pyalready applies to these shifts (shift64withi64_words):gfx2hlsl.py(i64_words) andpixel_aot.py(int64_operand) already apply.i64_wordsdoes.s[2k:2k+1],k <= 52) is read as a 64-bit value.gfx2hlsl.py;v_ashrrev_i64, which is not lowered here and appears in 2 requests.Tests: a hardware readback against a CPU reference.
-1,-16,64and1shifted by 0, 1, 31, 32, 33 and 63, in both directions; a literal with its top bit set (0x80000001); and an SGPR pair whose two words differ.AI-assisted.
@MasterDomino on GitHub · 2026-11-26 23:18 UTC · original
Closed by #2952, merged into
cpp-migrationas49e0e36d.native_shift64_hardwarepasses on an RTX 5080 (author) and on an RX 9070 XT, and dropping the sign extension of negative inlines fails it. AI-assisted.