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

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Stefan Schulze Frielinghaus
<[email protected]>:

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

commit r14-12924-ga3f953f4ca5cb5cfd9591adaf8568ae8f652bc6e
Author: Stefan Schulze Frielinghaus <[email protected]>
Date:   Fri Oct 9 08:58:03 2026 +0200

    expand_mult: Look through vector mode

    When expand_mult handles a constant vector multiplier where the scalar
    operand is a CONST_WIDE_INT, then also look through the vector mode
    while determining the shift amount since here we need the scalar mode.
    Note, when we call later on into expand_shift we need the vector mode,
    i.e., only for the shift amount we need the scalar mode.

            PR middle-end/127474

    gcc/ChangeLog:

            * expmed.cc (expand_mult): Look through vector mode.

    gcc/testsuite/ChangeLog:

            * gcc.dg/torture/pr127474.c: New test.

    (cherry picked from commit 5dc4ab23e0d01a1fd20c1365bdb2de039d831ff9)

Reply via email to