mbox series

[0/2] Add SSE4.1 "floor" intrinsics

Message ID 20210706225057.644872-1-pc@us.ibm.com
Headers show
Series Add SSE4.1 "floor" intrinsics | expand

Message

Paul A. Clarke July 6, 2021, 10:50 p.m. UTC
Just like the "ceil" intrinsics,
Instead of copying some tests from gcc/testsuite/gcc.target/i386,
I created new tests.  The i386 tests in question used rand() to
generate the input data and assembly to compute the rounded values.
Using rand() for testing seems wrong, and the assembly is obviously
not portable.  I use static data, primarily exercising the edges of
dynamic ranges (where fractions start to be unrepresentable).

Patch 2/2, containing the test cases, depends on the infrastructure
added in the previous patches for "ceil".

Paul A. Clarke (2):
  rs6000: Add support for SSE4.1 "floor" intrinsics
  rs6000: Add tests for SSE4.1 "floor" intrinsics

 gcc/config/rs6000/smmintrin.h                 |  28 +++++
 .../gcc.target/powerpc/sse4_1-floorpd.c       |  51 ++++++++
 .../gcc.target/powerpc/sse4_1-floorps.c       |  33 +++++
 .../gcc.target/powerpc/sse4_1-floorsd.c       | 119 ++++++++++++++++++
 .../gcc.target/powerpc/sse4_1-floorss.c       |  95 ++++++++++++++
 .../gcc.target/powerpc/sse4_1-roundpd-2.c     |  36 ++++++
 6 files changed, 362 insertions(+)
 create mode 100644 gcc/testsuite/gcc.target/powerpc/sse4_1-floorpd.c
 create mode 100644 gcc/testsuite/gcc.target/powerpc/sse4_1-floorps.c
 create mode 100644 gcc/testsuite/gcc.target/powerpc/sse4_1-floorsd.c
 create mode 100644 gcc/testsuite/gcc.target/powerpc/sse4_1-floorss.c
 create mode 100644 gcc/testsuite/gcc.target/powerpc/sse4_1-roundpd-2.c