https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127474
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Stefan Schulze Frielinghaus <[email protected]>: https://gcc.gnu.org/g:5dc4ab23e0d01a1fd20c1365bdb2de039d831ff9 commit r17-4477-g5dc4ab23e0d01a1fd20c1365bdb2de039d831ff9 Author: Stefan Schulze Frielinghaus <[email protected]> Date: Sun Sep 20 09:19:50 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.
