cpp-migration: direct-path v_add/sub/subrev/mul_f16 zero D[31:16], where gfx10 keeps it #3019
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#3019
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?
@archielcqp-a11y on GitHub · 2026-11-27 05:37 UTC · original
Commit or build
cpp-migration
999e17cdReproduction
Expected behavior
D[15:0] = the binary16 result, and D[31:16] keeps its value (
0xabcdhere).GCNSubtarget::zeroesHigh16BitsOfDestlists exactly these four ops,V_ADD/SUB/SUBREV/MUL_F16in_e32and_e64, under "On gfx10, all 16-bit instructions preserve the high bits", and returns false from GFX10 on.v_cvt_f16_f32already keeps the high half.Observed behavior
D[31:16] is written as zero. The fixture accepts this, because its model and comparator require a zero high half, and one of its mutants rejects a kept high half.
#2964 says the zeroing matches RDNA 2 but gives no source. As far as I know, nobody has measured these four f16 ops on silicon; the RDNA 2 evidence above is LLVM's rule and the integer measurement.
@SimSalabimse, if you had a measurement behind the zeroing, please say so and I'll drop this.
Environment
Windows 10 build 19045, MSVC 19.44, SDK and DXC 10.0.26100.0, NVIDIA GeForce RTX 3080 (driver 32.0.15.9174), debug layer on. The readback needs shader model 6.6. I ran it with a local copy of
native_store_replaylinked with the app-local Agility SDK exports, because the inbox Windows 10 runtime reports a skip (77).AI-assisted.
Checklist
@Leyukaka on GitHub · 2026-11-28 20:14 UTC · original
#3020 (
Fixes #3019 on cpp-migration) keeps D[31:16] for these four ops. It merged intocpp-migration, so this issue did not close on its own; its commitf6cdee10is now onmain8ecd30fe(through #3039). Can it be closed?