]> git.ipfire.org Git - thirdparty/gcc.git/commit
Enable vectorization for V2HF/V4HF rounding operations and sqrt.
authorliuhongt <hongtao.liu@intel.com>
Tue, 10 Oct 2023 06:52:33 +0000 (14:52 +0800)
committerliuhongt <hongtao.liu@intel.com>
Mon, 16 Oct 2023 01:08:06 +0000 (09:08 +0800)
commit96f12b9f9b9646deb0f7678a3f8d544e8d48cb91
treeefa3cd1e2274ccb834c746c26fc0ba3c1fc1dab1
parentd5cfabc677b08f38ea5d5f85deeda746b4fabb88
Enable vectorization for V2HF/V4HF rounding operations and sqrt.

gcc/ChangeLog:

* config/i386/i386-expand.cc (ix86_sse_copysign_to_positive):
Handle HFmode.
(ix86_expand_round_sse4): Ditto.
* config/i386/i386.md (roundhf2): New expander.
(lroundhf<mode>2): Ditto.
(lrinthf<mode>2): Ditto.
(l<rounding_insn>hf<mode>2): Ditto.
* config/i386/mmx.md (sqrt<mode>2): Ditto.
(btrunc<mode>2): Ditto.
(nearbyint<mode>2): Ditto.
(rint<mode>2): Ditto.
(lrint<mode><mmxintvecmodelower>2): Ditto.
(floor<mode>2): Ditto.
(lfloor<mode><mmxintvecmodelower>2): Ditto.
(ceil<mode>2): Ditto.
(lceil<mode><mmxintvecmodelower>2): Ditto.
(round<mode>2): Ditto.
(lround<mode><mmxintvecmodelower>2): Ditto.
* config/i386/sse.md (lrint<mode><sseintvecmodelower>2): Ditto.
(lfloor<mode><sseintvecmodelower>2): Ditto.
(lceil<mode><sseintvecmodelower>2): Ditto.
(lround<mode><sseintvecmodelower>2): Ditto.
(sse4_1_round<ssescalarmodesuffix>): Extend to V8HF.
(round<mode>2): Extend to V8HF/V16HF/V32HF.

gcc/testsuite/ChangeLog:

* gcc.target/i386/part-vect-roundhf.c: New test.
* gcc.target/i386/part-vect-sqrtph-1.c: New test.
gcc/config/i386/i386-expand.cc
gcc/config/i386/i386.md
gcc/config/i386/mmx.md
gcc/config/i386/sse.md
gcc/testsuite/gcc.target/i386/part-vect-roundhf.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/part-vect-sqrtph-1.c [new file with mode: 0644]