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

--- Comment #4 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
(In reply to Jiahao Xu from comment #3)

> We now consider it as undefined behavior rather than a bug for [x]vshuf
> instructions. In vec_perm pattern, we use vector logical AND instructions to
> perform modulo operations in order to correctly use the [x]vshuf
> instructions. Therefore, we have decided to rewrite the two tests and ensure
> that the index values in the selector do not exceed 64.

I guess it would be better to also document this issue somewhere (extend.texi
?) and recommends to just use __builtin_shuffle instead of the intrinsic
(unless the programmer knows the AND operation is not needed but the compiler
does not).

Reply via email to