Description of problem: vec_vmul{e,o}u{b,h} functions return incorrect results, because they compile down to instructions that differ in signedness, e.g. vec_vmuleub function compiles down to the vmulesb instruction. This also applies to generic vec_mule and vec_mulo functions when they are used with a pair of unsigned char or unsigned short arguments. Version-Release number of selected component (if applicable): gcc-7.0.1-0.10.fc26 How reproducible: always Steps to Reproduce: 1. $ cat reproducer.c #include <limits.h> #include <assert.h> #include <altivec.h> int main(void) { vector unsigned char v0 = {1, 0, 0, 0, 0, 0, 0, 0}; vector unsigned char v1 = {UCHAR_MAX, 0, 0, 0, 0, 0, 0, 0}; vector unsigned short res = vec_vmuleub(v0, v1); assert(res[0] == (unsigned short)v0[0] * (unsigned short)v1[0]); } 2. $ gcc -maltivec -mabi=altivec reproducer.c -o reproducer 3. $ ./reproducer reproducer: reproducer.c:12: main: Assertion `res[0] == (unsigned short)v0[0] * (unsigned short)v1[0]' failed. Aborted (core dumped) Actual results: assertion fails Expected results: assertion succeeds Additional info: This affects build of libjpeg-turbo, making it generate broken images.
This is fixed since gcc-7.0.1-0.15.fc26, right?
Already since gcc-7.0.1-0.13.fc26.