Skip to content
Snippets Groups Projects
Unverified Commit cc33531d authored by Ricardo Jesus's avatar Ricardo Jesus Committed by Jonathan Wakely
Browse files

aarch64: libstdc++: Use shufflevector instead of shuffle in opt_random.h


This patch modifies the implementation of the vectorized mersenne
twister random number generator to use __builtin_shufflevector instead
of __builtin_shuffle. This makes it (almost) compatible with Clang.

To make the implementation fully compatible with Clang, Clang will need
to support internal Neon types like __Uint8x16_t and __Uint32x4_t, which
currently it does not. This looks like an oversight in Clang and so will
be addressed separately.

I see no codegen change with this patch.

Bootstrapped and tested on aarch64-none-linux-gnu.

libstdc++-v3/ChangeLog:

	* config/cpu/aarch64/opt/ext/opt_random.h (__VEXT): Replace uses
	of __builtin_shuffle with __builtin_shufflevector.
	(__aarch64_lsl_128): Move shift amount to a template parameter.
	(__aarch64_lsr_128): Move shift amount to a template parameter.
	(__aarch64_recursion): Update call sites of __aarch64_lsl_128
	and __aarch64_lsr_128.

Signed-off-by: default avatarRicardo Jesus <rjj@nvidia.com>
parent b02503d3
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment