https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82015
Bug ID: 82015 Summary: PowerPC should check if 2nd argument to __builtin_unpackv1ti and similar functions is 0 or 1 Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: meissner at gcc dot gnu.org Target Milestone: --- If you have the code: vector __int128_t a[10] = { 1,2,3,4,5,6,7,8,9,0 }; vector __int128_t foo() { unsigned long long x = __builtin_unpack_vector_int128(a[0], 11); unsigned long long y = x*2; vector __int128_t z = __builtin_pack_vector_int128(x,y); return z; } The compiler sees that the 2nd argument is not 0 nor 1, and puts it into a register. Instead the compiler should complain if any of the 128-bit unpack functions pass something other than 0 or 1 in the 2nd argument.