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

--- Comment #12 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Avinash Jayakar
<[email protected]>:

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

commit r13-9987-gd02cd309ad2f4b79f74f477bc3f271b884c916b5
Author: Avinash Jayakar <[email protected]>
Date:   Sat Nov 8 09:57:59 2025 +0530

    isel: Check bounds before converting VIEW_CONVERT to VEC_SET.

    The function gimple_expand_vec_set_expr in the isel pass, converted
    VIEW_CONVERT_EXPR to VEC_SET_EXPR without checking the bounds on the index,
    which cause ICE on targets that supported VEC_SET_EXPR like x86 and
powerpc.
    This patch adds a bound check on the index operand and rejects the
conversion
    if index is out of bound.

    2025-11-08  Avinash Jayakar  <[email protected]>

    gcc/ChangeLog:
            PR tree-optimization/122126
            * gimple-isel.cc (gimple_expand_vec_set_extract_expr): Add bound
check.

    gcc/testsuite/ChangeLog:
            PR tree-optimization/122126
            * gcc.dg/pr122126_vextr.c: New test.
            * gcc.dg/pr122126_vset.c: New test.

Reply via email to