On Thu, Oct 22, 2026 at 11:26:05AM +0530, Avinash Jayakar wrote: > From: Avinash Jayakar <[email protected]> > > The results produced by the intrinsic vec_genpcvm were wrong for LE > targets and the test case xxgenpc-runnable.c had incorrect expected > results, due to which the BE target reported it as failed. > > For preserving the bi-endian semantics of this built-in the input as > well as the ouput has to be reversed based on the type for LE targets. > Therefore in this commit, we hass a helper vsx_reverse_elts_<mode> which > generates instructions to reverse the elements in a vector register > based on the mode for LE targets. Using this in the xxgenpcvm expansion > to reverse inputs and the outputs fixes the tests in both LE and BE. > > Bootstrapped and regtests on ppc64-linux-gnu and ppc64le-linux-gnu. Ok > for trunk?
My trouble with the patch is given that are few if any power10 systemss running big endian distributions in real customers. Almost every power10 system is running a little endian distribution. I would rather make its current output on LE systems to be the official result, and change what the result is for BE systems. Change the test obviously. We need to make sure this change is clearly documented in the GCC 17 release notes. It may be useful to define a BE variant that produces the expected result in a BE context. -- Michael Meissner, IBM PO Box 98, Ayer, Massachusetts, USA, 01432 email: [email protected]
