[PATCH] libstdc++: Avoid MMX return types from __builtin_shufflevector

Matthias Kretz m.kretz@gsi.de
Wed May 15 19:49:56 GMT 2024


Tested on aarch64-linux-gnu, arm-linux-gnueabihf, powerpc64le-linux-gnu, 
x86_64-linux-gnu (-m64, -m32, -mx32), and arm-linux-gnueabi

OK for trunk? And when backporting, should I squash it with the commit that 
introduced the regression?

-------------------- 8< -------------------

This resolves a regression on i686 that was introduced with
r15-429-gfb1649f8b4ad50.

Signed-off-by: Matthias Kretz <m.kretz@gsi.de>

libstdc++-v3/ChangeLog:

	PR libstdc++/114958
	* include/experimental/bits/simd.h (__as_vector): Don't use
	vector_size(8) on __i386__.
	(__vec_shuffle): Never return MMX vectors, widen to 16 bytes
	instead.
	(concat): Fix padding calculation to pick up widening logic from
	__as_vector.
---
 libstdc++-v3/include/experimental/bits/simd.h | 39 +++++++++++++------
 1 file changed, 28 insertions(+), 11 deletions(-)


--
──────────────────────────────────────────────────────────────────────────
 Dr. Matthias Kretz                           https://mattkretz.github.io
 GSI Helmholtz Centre for Heavy Ion Research               https://gsi.de
 stdₓ::simd
──────────────────────────────────────────────────────────────────────────
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-libstdc-Avoid-MMX-return-types-from-__builtin_shuffl.patch
Type: text/x-patch
Size: 2812 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20240515/37a6c3a4/attachment.bin>


More information about the Libstdc++ mailing list