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

--- Comment #2 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:49c44911df72f55e2004ffa9f5eb362de29ca188

commit r16-457-g49c44911df72f55e2004ffa9f5eb362de29ca188
Author: Jeff Law <j...@ventanamicro.com>
Date:   Wed May 7 15:06:58 2025 -0600

    [RISC-V][PR target/120137][PR target/120154] Don't create out-of-range
permutation constants

    To make hashing sensible we canonicalize constant vectors in the hash table
so
    that their first entry always has the value zero.  That normalization can
    result in a value that can't be represented in the element mode.

    So before entering anything into the hash table we need to verify the
    normalized entries will fit into the element's mode.

    This fixes both 120137 and its duplicate 120154.  This has been tested in
my
    tester.  I'm just waiting for the pre-commit tester to render its verdict.

            PR target/120137
            PR target/120154
    gcc/
            * config/riscv/riscv-vect-permconst.cc (process_bb): Verify each
            canonicalized element fits into the vector element mode.

    gcc/testsuite/

            * gcc.target/riscv/pr120137.c: New test.
            * gcc.target/riscv/pr120154.c: New test.

Reply via email to