Auto merge of #84205 - workingjubilee:more-simd-intrin, r=bjorn3

Add simd_{round,trunc} intrinsics

LLVM supports many functions from math.h in its IR. Many of these
have SIMD instructions on various platforms. So, let's add round and
trunc so std::arch can use them.

Yes, exact comparison is intentional: rounding must always return a
valid integer-equal value, except for inf/NAN.
This commit is contained in:
bors 2021-04-15 21:00:11 +00:00
commit 7af1f55ae3
5 changed files with 34 additions and 13 deletions

View file

@ -1103,6 +1103,7 @@ symbols! {
simd_reduce_or,
simd_reduce_xor,
simd_rem,
simd_round,
simd_saturating_add,
simd_saturating_sub,
simd_scatter,
@ -1111,6 +1112,7 @@ symbols! {
simd_shl,
simd_shr,
simd_sub,
simd_trunc,
simd_xor,
since,
sinf32,