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

Kirill Smirnov <kirill.k.smirnov at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kirill.k.smirnov at gmail dot 
com

--- Comment #2 from Kirill Smirnov <kirill.k.smirnov at gmail dot com> ---
Concerning the original Anton's test case (other test case ICE are different).

The problem is that right now (50e2a7df756c1cd89b37ff6882e1bdb6ebe3697f) LRA is
too permissive while generating vectorized code. RISC-V specification has a set
of rules governing vector registers overlap for widen instructions. Originally,
gcc did not allow any overlap at all. The following commit relaxed this
restriction for vfwcvt.f.x<u>.v instructions:

commit d52709668a7fe7b22e2c3734e0bebf67faaef29a
Author: Pan Li <[email protected]>
Date:   Mon Jul 20 13:32:37 2026 +0800

    RISC-V: Allow RVV register overlap for vfwcvt.f.x[u]

    Like v[sz]ext.vf8, allow the rvv register overlap
    for vfwcvt.f.x[u].v.

    gcc/ChangeLog:

            * config/riscv/vector.md: Leverage Wvr constraint.

    Signed-off-by: Pan Li <[email protected]>

Unfortunately, this patch leads to such registers overlap that is invalid from
the spec's point of view. Gcc catches this violation on some stage and
generates ICE.

LLM provided me some explanation why it happens, but since I am not familiar
with gcc internals, the best I can do is suggest reverting the patch rather
than properly fixing it. Someone skilled enough, please, take a look.

Reply via email to