shader: lower s_absdiff_i32 #128
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/128"
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 LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-26T17:57:40Z.
s_absdiff_i32was decoded but refused ("s_absdiff_i32": 1 unique compute shader in the #123 story-load log, commit182c14f).What. It is lowered as the RDNA2 ISA's SOP2 operation:
D = S0 - S1as a wrapping 32-bit difference, negated when it is negative as a signed number, andSCC = D != 0. The arm sits next tos_abs_i32.Tests.
gfx_refusal_tests::absdiff_translates: an FSPX compute program translates. It is refused on main.victory-gpuaddr_tests::absdiff_is_the_magnitude_of_the_signed_difference_on_the_gpuruns on Metal. It checks D and SCC for (5, 9), (9, 5), (-3, 4), (7, 7), (MIN, 1), (1, MIN) and (MIN, 0). The wrapping cases are the hardware's magnitudes:1 - MINgivesi32::MAX, and|MIN - 0|gives0x8000_0000.The old refusal text appears nowhere else in
crates/. victory-shader and victory-gpu tests (arm64, Metal), Windows clippy andcargo xtask policypass.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-26T18:10:01Z.
Merged, thanks.
s_absdiff_i32lowers, and the GPU test covers the wrapping cases.