https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113095
--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-13 branch has been updated by Kito Cheng <k...@gcc.gnu.org>: https://gcc.gnu.org/g:6335baaf31c0f1f0952d1a3f507b0e5655b1136f commit r13-8663-g6335baaf31c0f1f0952d1a3f507b0e5655b1136f Author: Monk Chiang <monk.chi...@sifive.com> Date: Wed Jan 24 10:19:28 2024 -0700 [PATCH v3] RISC-V: Add split pattern to generate SFB instructions. [PR113095] Since the match.pd transforms (zero_one == 0) ? y : z <op> y, into ((typeof(y))zero_one * z) <op> y. Add splitters to recongize this expression to generate SFB instructions. gcc/ChangeLog: PR target/113095 * config/riscv/riscv.md: New splitters to rewrite single bit sign extension as the condition to SFB instructions. gcc/testsuite/ChangeLog: * gcc.target/riscv/sfb.c: New test. * gcc.target/riscv/pr113095.c: New test. (cherry picked from commit fb54b9772816968032518d4008be5090e0d95109)