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

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

https://gcc.gnu.org/g:7d966cc35ad01d70cd9bfb6f531c938a7b6110b7

commit r16-5097-g7d966cc35ad01d70cd9bfb6f531c938a7b6110b7
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