[PATCH 5/5] libstdc++: Test and fix simd masked loads

Matthias Kretz MatthiasKretz@gmx.net
Mon Mar 2 10:15:49 GMT 2026


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

libstdc++-v3/ChangeLog:

	* include/bits/simd_loadstore.h (unchecked_load): Scalar partial
	masked loads are either a simple load or nothing.
	* include/bits/simd_mask.h (_S_partial_mask_of_n): Conversion
	from bool or unsigned integer to basic_mask needs explicit
	constructor call. Scalar masks don't need a recursion to
	_S_partial_mask_of_n.
	* include/bits/simd_vec.h (_S_masked_load): Add case for size 1.
	This is needed for recursion from _ScalarAbi<N> with N > 1.
	* testsuite/std/simd/loads.cc: Add tests for masked loads.
---
 libstdc++-v3/include/bits/simd_loadstore.h | 11 ++--
 libstdc++-v3/include/bits/simd_mask.h      | 15 ++++--
 libstdc++-v3/include/bits/simd_vec.h       |  6 ++-
 libstdc++-v3/testsuite/std/simd/loads.cc   | 63 ++++++++++++++++------
 4 files changed, 70 insertions(+), 25 deletions(-)


--
──────────────────────────────────────────────────────────────────────────
 Dr. Matthias Kretz                           https://mattkretz.github.io
 GSI Helmholtz Center for Heavy Ion Research               https://gsi.de
 std::simd
──────────────────────────────────────────────────────────────────────────
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-libstdc-Test-and-fix-simd-masked-loads.patch
Type: text/x-patch
Size: 7050 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20260302/ac1be6f4/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part.
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20260302/ac1be6f4/attachment.sig>


More information about the Libstdc++ mailing list