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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Przemyslaw Wirkus <wir...@gcc.gnu.org>:

https://gcc.gnu.org/g:d44d47b49267b4265cee16d25b3f89dbf967cc0c

commit r11-6262-gd44d47b49267b4265cee16d25b3f89dbf967cc0c
Author: Przemyslaw Wirkus <przemyslaw.wir...@arm.com>
Date:   Fri Dec 18 18:18:57 2020 +0000

    aarch64: SVE: ICE in expand_direct_optab_fn [PR98177]

    Problem comes from using the wrong interface to get the index type for a
    COND_REDUCTION. For fixed-length SVE we get a V2SI (a 64-bit Advanced
    SIMD vector) instead of a VNx2SI (an SVE vector that stores SI elements
    in DI containers).

    Credits to Richard Sandiford for pointing out the issue's root cause.

    Original PR snippet proposed to reproduce issue was only causing ICE for
C++
    compiler (see pr98177-1 test cases). I've slightly modified original
    snippet in order to reproduce issue on both C and C++ compilers. These
    are pr98177-2 test cases.

    gcc/ChangeLog:

            PR target/98177
            * tree-vect-loop.c (vect_create_epilog_for_reduction): Use
            get_same_sized_vectype to obtain index type.
            (vectorizable_reduction): Likewise.

    gcc/testsuite/ChangeLog:

            PR target/98177
            * g++.target/aarch64/sve/pr98177-1.C: New test.
            * g++.target/aarch64/sve/pr98177-2.C: New test.
            * gcc.target/aarch64/sve/pr98177-1.c: New test.
            * gcc.target/aarch64/sve/pr98177-2.c: New test.

Reply via email to