libstdc++: ppc: conditionalize vsx-only simd intrinsics
authorAlexandre Oliva <oliva@adacore.com>
Fri, 13 May 2022 06:05:45 +0000 (03:05 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Fri, 13 May 2022 06:05:45 +0000 (03:05 -0300)
commita4183ab7cfb8fee318165a3a5c169dcbd18cae4d
tree150498a3396a12d8148db1df2b89301b7f2fbaad
parent05a3929f9c15ebe7abe9c8f88ef795acb3281c49
libstdc++: ppc: conditionalize vsx-only simd intrinsics

libstdc++'s bits/simd.h section for PowerPC, guarded by __ALTIVEC__,
defines various intrinsic vector types that are only available with
__VSX__: 64-bit long double, double, (un)signed long long, and 64-bit
(un)signed long.

experimental/simd/standard_abi_usable{,_2}.cc tests error out
reporting the unmet requirements when the target cpu doesn't enable
VSX.  Make the reported instrinsic types conditional on __VSX__ so
that <experimental/simd> can be used on PowerPC variants that do not
support VSX.

for  libstdc++-v3/ChangeLog

* include/experimental/bits/simd.h [__ALTIVEC__]: Require VSX
for double, long long, and 64-bit long intrinsic types.
[__ALTIVEC__] (__intrinsic_type): Mention 128-bit in
preexisting long double diagnostic, adjust no-VSX double
diagnostic to cover 64-bit long double as well.

(cherry picked from commit 469c76f0d94d03e29467a9d1e77cd3613f46ac2f)
libstdc++-v3/include/experimental/bits/simd.h