https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109964
Bug ID: 109964
Summary: auto-vectorization of shift ignores integral
promotions
Product: gcc
Version: 13.1.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: mkretz at gcc dot gnu.org
Target Milestone: ---
Target: powerpc64le-*-*
Test cases:
short: https://godbolt.org/z/oM56Pd19o
char: https://godbolt.org/z/f5Tc6TMEd
The POWER vector shifts read only 3/4 bits from the rhs vector. Thus, shifts
that are valid on int (i.e. >= 8 or >= 16) are translated incorrectly when
using the vector shift instructions. If the rhs values are not known to be
bounded a fix-up is necessary.