Shaders: v_cmp_f and v_cmp_tru are the constants false and true (restores upstream 77053a0) #241
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/241"
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 DexNom/VIctory. Originally posted by murillojndem on 2026-11-30T03:18:24Z.
v_cmp_f_f32andv_cmp_tru_f32(and their f16 forms, in the same arm of the lowering) are false and true whatever their operands. They were lowered as LLVMfcmp falseandfcmp true. On WARP a dispatch of such a program removes the device ("the GPU device instance has been suspended"); the RX 7900 XT runs it and gives the right results. They are now the constants false and true, which is the same result on every host.pred::FALSEstays inbitcode.rswith#[allow(dead_code)], aspred::ONEdoes for the same kind of reason.This is the compare part of upstream Marvisak/VIctory
77053a0(Marvis), which570a941removed with the rest of that commit.Tests:
emit::valu_tests::float_compares_that_are_always_false_or_true_are_constants:v_cmp_f_f32andv_cmp_tru_f32of NaN and 1.0, 1.0 and 2.0, and NaN and NaN, the mask taken into v0 byv_cndmask_b32, on WARP and the RX 7900 XT. On main the first WARP dispatch removes the device; with this change it passes on both.-D warnings, with and without--all-features(and forvictory), andcargo xtask policypass. rustfmt reports the same differences as on main. It merges with my open PRs.Limits:
Generated with Claude Code
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.