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

Jeffrey A. Law <law at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[Trunk] RISC-V rv64gcv: ICE |[16 Regression] RISC-V
                   |at -O3 during RTL pass:     |rv64gcv: ICE at -O3 during
                   |expand                      |RTL pass: expand
     Ever confirmed|0                           |1
                 CC|                            |kito at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2025-12-30

--- Comment #1 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Bisected to:

commit 76eb9c49275941e15cb598af5d9b58361dd65a98
Author: Kito Cheng <[email protected]>
Date:   Mon Sep 1 18:29:53 2025 +0800

    RISC-V: Allow VLS types using up to LMUL 8

    We used to apply -mrvv-max-lmul= to limit VLS code gen, auto vectorizer,
    and builtin string function expansion. But I think the VLS code gen part
doesn't
    need this limit, since it only happens when the user explicitly writes
vector
    types.

    For example, int32x8_t under -mrvv-max-lmul=m1 with VLEN=128 would be split
into
    two int32x4_t, which generate more instructions and runs slower.

    In this patch, I changed -mrvv-max-lmul= to only affect auto vectorization
and
    builtin string function expansion. Actually, the option's help text already
    says it only controls the LMUL used by auto-vectorization, so I believe
this
    change is makes sense :)

    Changes since v1:
    - Add testase to make sure auto vectorizer is still constrained by
      -mrvv-max-lmul=.

    gcc/ChangeLog:

            * config/riscv/riscv-protos.h (vls_mode_valid_p): New argument
            allow_up_to_lmul_8.
            * config/riscv/riscv-v.cc (autovectorize_vector_modes): Set
            allow_up_to_lmul_8 to false.
            (vls_mode_valid_p): Add new argument allow_up_to_lmul_8, and use
            it to determine whether to allow LMUL 8.

    gcc/testsuite/ChangeLog:

            * gcc.target/riscv/rvv/vls-type-rvv-max-lmul.c: New test.
            * gcc.target/riscv/rvv/vls-type-rvv-max-lmul-autovec.c: New
            test.

I haven't done any additional debugging beyond bisection.

Reply via email to