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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Christoph Meullner
<[email protected]>:

https://gcc.gnu.org/g:0926932e390e8317354acc564dc5e16c9e861418

commit r16-8544-g0926932e390e8317354acc564dc5e16c9e861418
Author: Christoph Müllner <[email protected]>
Date:   Wed Apr 8 18:21:04 2026 +0200

    RISC-V: Fix Zbkb single-bit IOR/XOR synthesis [PR124818]

    Only Zbs provides the bseti/binvi support that can directly handle a
    large single-bit immediate in scalar IOR/XOR operations.  Zbkb alone
    does not, but synthesize_ior_xor treated Zbkb as sufficient and
    returned false for such constants.

    On RV32 with -march=rv32gc_zbkb this leaves an unmatchable
    (ior:SI reg (const_int 0x20000)) RTL insn, which later triggers an ICE
    in extract_insn during virtual register instantiation.

    Restrict the single-bit fast path to Zbs and add an RV32 Zbkb
    regression test for the reduced reproducer.

            PR target/124818

    gcc/ChangeLog:

            * config/riscv/riscv.cc (synthesize_ior_xor): Do not treat
            TARGET_ZBKB as sufficient for single-bit immediate IOR/XOR.

    gcc/testsuite/ChangeLog:

            * gcc.target/riscv/pr124818.c: New test.

    Signed-off-by: Christoph Müllner <[email protected]>
  • [Bug target/124818] RV32 Zbkb I... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to