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

--- Comment #1 from Manjunath S Matti <mmatti at linux dot vnet.ibm.com> ---
I see that OpenBLAS does the following

#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
#define __builtin_vsx_assemble_pair2(vp0, v0, v1)
__builtin_vsx_assemble_pair(vp0, v1, v0)
#else
#define __builtin_vsx_assemble_pair2(vp0, v0, v1)
__builtin_vsx_assemble_pair(vp0, v0, v1)
#endif

Link to the code above:
https://github.com/OpenMathLib/OpenBLAS/blob/632ef874379c16ca8646d9fa0f6c60449e47d960/kernel/power/gemm_common.c#L22

PR96236 handles the little-endian memory ordering in the backend
rs6000_gimple_fold_mma_builtin. 

My opinion is that for any given function(builtins) the order of the parameters
must not depend on the Endianness, rather it should be handled by the compiler.

So which approach do I take here? If I change the behaviour, then software such
as OpenBLAS have to revert/comply to the new changes.

Reply via email to