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

--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Claudiu Zissulescu <[email protected]>:

https://gcc.gnu.org/g:6da0b1468bfc4fbf4e8029b9dd634c31cb8261d8

commit r17-4382-g6da0b1468bfc4fbf4e8029b9dd634c31cb8261d8
Author: Michiel Derhaeg <[email protected]>
Date:   Thu Sep 17 11:38:06 2026 +0300

    arc: Don't advertise optab for unsupported vector modes [PR126243]

    <voptab>v2si3 advertised V2SImode optabs (mul/div/smin/smax) whenever the
    scalar op existed, but V2SImode is only a supported vector mode under
    TARGET_PLUS_QMACW.

    Since r15-5493-g485ab50c204ddb ("Add helpers to test whether an optab
    can be implemented") the middle-end keeps the operation vectorized on
    such cores.  The operands degrade to DImode and it is expanded as a
    double-word scalar op: mul and div silently compute on the packed pair,
    min and max ICE in expand_expr_real_2 for lack of a DImode expansion.

    Require TARGET_PLUS_QMACW so the optab matches
    arc_vector_mode_supported_p.

    No tests added because this is already covered by existing tests.

            PR target/126243

    gcc/ChangeLog:

            * config/arc/simdext.md (<voptab>v2si3): Require TARGET_PLUS_QMACW.

    Signed-off-by: Michiel Derhaeg <[email protected]>

Reply via email to