https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94892
--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jeff Law <[email protected]>: https://gcc.gnu.org/g:1e4294de8ef6d606b61d7d4b2b8b6237651961c5 commit r17-147-g1e4294de8ef6d606b61d7d4b2b8b6237651961c5 Author: Jeff Law <[email protected]> Date: Tue Apr 28 10:07:07 2026 -0600 [RISC-V][PR tree-optimization/94892] Improve equality test of sign bit splat against zero One of the tests in pr94892 showed a case where we failed to convert a sign bit splat + equality test against into a simple lt/ge test which doesn't require the sign bit splat. This is only failing on rv64, probably because the case in question has a DI sign bit splat, then we take a lowpart SI subreg. The lowpart dance isn't needed for rv32, though I've structured the test to verify that we get sensible code on rv32 as well as rv64. Like many other patches I'm submitting now, this has been in my tester for a while, but the test has not. I'll be waiting on the pre-commit tester to verify sanity before moving forward. I'm particularly interested to see how it behaves with no -march flags. It should be taking the defaults from when the toolchain was built, which should do what we want. Jeff PR tree-optimization/94892 gcc/ * config/riscv/riscv.md (sign_bit_splat_equality_test): New pattern. gcc/testsuite/ * gcc.target/riscv/pr94892.c: New test.
