https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120333

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jeff Law <l...@gcc.gnu.org>:

https://gcc.gnu.org/g:38fa6c0455ec14f2f42310a817b90765ad894aa4

commit r16-740-g38fa6c0455ec14f2f42310a817b90765ad894aa4
Author: Jeff Law <j...@ventanamicro.com>
Date:   Mon May 19 16:55:15 2025 -0600

    [committed][RISC-V][PR target/120333] Remove bogus bext pattern

    I goof'd when doing analysis of missed bext cases.  For the shift into the
sign
    bit, then shift into the low bit case (thankfully the least common), I got
it
    in my brain that the field is at the left shift count.   It's actually at
    word_size - 1 - left shift count.

    One the subtraction is included, it's no longer profitable to turn those
cases
    into bext.  Best case scenario would be sub+bext, but we can just as easily
use
    sll+srl which fuses in some designs into a single op.

    So this patch removes those two patterns, adjusts the existing testcase and
    adds the new execution test.

    Given it's a partial reversion and has passed in my tester, I'm going to go
    ahead and push it to the trunk rather than waiting for upstream CI.

            PR target/120333
    gcc/
            * config/riscv/bitmanip.md: Remove bext formed from left+right
            shift patterns.

    gcc/testsuite/

            * gcc.target/riscv/pr114512.c: Update expected output.
            * gcc.target/riscv/pr120333.c: New test.

Reply via email to