Shaders: lower s_bitcmp0/1_b32 and s_bitcmp0/1_b64 #117
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/117"
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 Marvisak/VIctory. Originally posted by tedin7 on 2026-11-24T00:39:48Z.
What
s_bitcmp0_b32,s_bitcmp1_b32,s_bitcmp0_b64ands_bitcmp1_b64. SCC becomes whether bitsrc1(mod 32, mod 64 for the 64-bit forms) ofsrc0is clear (bitcmp0) or set (bitcmp1).Why
sop()had no case for them. Any shader using one failed to translate withUnsupported.Tested
cargo test -j4 -p victory-shader scalar_bit_tests_lowerwith the lowering disabled (test only): fails withUnsupported { offset: 8, what: "s_bitcmp0_b32" }.cargo test -j4 -p victory-shaderafter the change: 56 passed (origin/main237f2e8), 0 failed (the new test included).cargo clippy -j4 -p victory-shader --tests: no new warnings (existing: dead_codeconstant_colorin emit/mod.rs, a boolean-simplification note in resource.rs).rustfmt --edition 2024 --checkon lower.rs: clean.lowers()helper in the tests module.Imported from Marvisak/VIctory. Originally posted by lordon1a on 2026-11-24T00:51:46Z.
Verified
3c860538eon Windows 11 (x86_64-pc-windows-gnullvm,rustc 1.100.0, applied cleanly tomain@4c0bb89): pass.cargo xtask policy: 151 files okcargo test -p victory-shader -- --skip v_med3_f32_matches_rdna2_with_nan: 69 passed, 0 failed.AI-assisted.
Imported from Marvisak/VIctory. Originally posted by DaviTostes on 2026-11-24T01:10:02Z.
Tested
3c86053on Arch Linux x86_64, rustc 1.98.1: pass.cargo test -p victory-shader: 56 passed, 0 failed (2 test binaries), including the 1 test this PR adds.s_bitcmp0/1_b32/s_bitcmp0/1_b64(ands_sext), and is open; one of the two should be closed.victory-gpuE0425.